Using Webhooks to Receive Real-Time Updates
Webhooks are a powerful way to get real-time notifications about events happening in your account sent to your own applications.
What is a Webhook?
A webhook is an HTTP callback. When a specific event occurs in our system (e.g., a new invoice is created), we send an HTTP POST request to a URL you provide. This request contains a JSON payload with information about the event.
Creating a Webhook
- As an admin, navigate to 'Settings' > 'Developer' > 'Webhooks'.
- Click 'Add Webhook'.
- Payload URL: Enter the URL of your application that will receive the webhook data. This URL must be publicly accessible.
- Secret: We highly recommend setting a secret token. This token will be used to sign the webhook payload, so you can verify that the request came from us.
- Events: Select the specific events you want to be notified about from the checklist. Avoid subscribing to all events unless necessary to reduce unnecessary traffic.
- Click 'Create Webhook' to activate it.
Verifying Signatures
We include a signature in the X-Webhook-Signature header of each request. You should compute a signature using the secret and the request body and compare it to the one we sent to ensure the request is authentic.
Comments
0 comments
Please sign in to leave a comment.