Webhooks are automated HTTP POST requests sent by Cadana when events occur on the platform. Use them to get real-time updates for transactions, payroll, KYC, and more.Documentation Index
Fetch the complete documentation index at: https://docs.cadanapay.com/llms.txt
Use this file to discover all available pages before exploring further.
Webhook Structure
Every webhook follows this envelope structure:JSON
| Field | Description |
|---|---|
id | Unique webhook ID. Use this to deduplicate — retried webhooks are sent with the same id. |
eventType | The event type (e.g., transaction.succeeded). See Events for the full list. |
version | Webhook version |
timestamp | Unix timestamp when the webhook was sent |
data | Event-specific payload. See Events for payload structures. |
Getting Started
Configure Your Endpoint
- Navigate to Settings → Developers → Webhooks in the Dashboard
- Click Add Webhook
- Enter the URL where you want to receive events
Handle Events
After registering an endpoint, Cadana sends an HTTP POST request to your URL every time a subscribed event occurs. Parse theeventType field to determine how to handle each event.
Respond Promptly
Your endpoint must return a2xx status code to acknowledge receipt. Any response outside the 2xx range — including 3xx redirects — is treated as a failure and will trigger retries.
Verifying Webhooks
Every webhook includes signature headers you should verify to confirm it was sent by Cadana.Signature Headers
| Header | Description |
|---|---|
svix-id | Unique message ID from the delivery provider |
svix-timestamp | Unix timestamp of the webhook |
svix-signature | HMAC-SHA256 signature of the payload |
Verification
Use the Svix libraries to verify signatures automatically:- Node.js
- Python
- Go
JavaScript
Retry Policy
If your endpoint fails to respond with a2xx status code, Cadana retries delivery with exponential backoff:
| Attempt | Delay |
|---|---|
| 1st retry | 5 seconds |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 5 hours |
| 6th retry | 10 hours |
| 7th retry | 24 hours |
Best Practices
- Respond immediately — Return
200 OKfirst, process asynchronously. Don’t do heavy work before responding. - Deduplicate — Use the
idfield to detect and skip duplicate deliveries. Retried webhooks keep the sameid. - Fetch the latest state — Webhooks can arrive out of order. After receiving an event, fetch the resource via API (e.g.,
GET /v1/payouts/{id}) to get the latest state. - Implement reconciliation — Webhook delivery is not guaranteed. Periodically poll the API to catch any missed events.
- Verify signatures — Always verify the
svix-signatureheader before processing a webhook to prevent spoofing.