Overview
Webhooks push event notifications to your server in real time. Instead of polling the API to check payout status, you register a URL and Anton sends HTTP POST requests when events occur.How webhooks work
Delivery
Anton sends an HTTP POST to your URL with the event payload as JSON. The request includes an
X-Anton-Signature header for verification.Event types
| Event | Description |
|---|---|
payout.created | A payout was created |
payout.screening | Payout entered screening |
payout.approved | Payout approved (maker-checker) |
payout.processing | Payout submitted to rail |
payout.sent | Rail confirmed dispatch |
payout.completed | Payout delivered successfully |
payout.failed | Payout delivery failed |
payout.returned | Funds returned |
payout.cancelled | Payout cancelled |
payee.created | A payee was created |
payee.updated | A payee was updated |
payee.deleted | A payee was deleted |
batch.completed | A batch finished processing |
batch.failed | A batch processing failed |
Webhook payload
Every webhook delivery contains:Signature verification
Every webhook request includes anX-Anton-Signature header containing an HMAC-SHA256 signature of the raw request body. Always verify this signature before processing the payload to confirm the request came from Anton.
Obtaining your signing secret
Retrieve the signing secret for a webhook subscription:Response
Verifying signatures
Compute the HMAC-SHA256 of the raw request body using your signing secret, then compare it to the value in theX-Anton-Signature header.
Retry policy
If your endpoint doesn’t return a2xx response, Anton retries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | Immediately |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 8 hours |
Best practices
Return 2xx quickly
Return 2xx quickly
Process webhook payloads asynchronously. Return a
200 response immediately, then handle the event in a background job. This prevents timeouts and ensures reliable delivery.Handle duplicate deliveries
Handle duplicate deliveries
Use the event
id field to deduplicate. In rare cases, Anton may deliver the same event more than once. Your handler should be idempotent.Verify before processing
Verify before processing
Always verify the
X-Anton-Signature header before acting on a webhook payload. Never trust unverified requests.