Overview
Our webhook system delivers event notifications in real-time. When a subscribed event occurs (e.g., an invoice’s status updates), our service will send aPOST request to your configured endpoint.
Authentication
We pass the authentication token via an HTTP header namedX-Webhook-Token. Your endpoint must verify this header’s value against the one you have on file with us. Only process the request if they match.
Example of a webhook request with authentication:
Events
Below are the currently supported events:| Event Type | Description |
|---|---|
invoice.status-updated | Triggered whenever an invoice’s status changes. |
How Webhooks Are Sent
When an event occurs, the webhook request body is structured as follows:-
id: A unique identifier (UUID) for the webhook event. -
event: The event type, such asinvoice.status-updated. -
payload: An object containing the event-specific data (described below).
X-Webhook-Token header is included separately from the JSON payload.
Webhook Payloads
Invoice Status Updated (invoice.status-updated)
This event is triggered when an invoice’s status changes. The payload provides details of the invoice and any associated data.
Payload Structure:
Enumerations
- InvoiceStatus:
open,in_review,issued,synced,pending,paid,overdue,canceled,failed
Verifying Webhooks
-
Check the
X-Webhook-TokenHeader: Ensure it matches the token you have registered. -
Parse the JSON Payload: Review the
eventandpayload. - Process the Event: Update your systems accordingly.
- Respond with a 2XX Status: Acknowledge receipt to prevent retries.