- Update internal records when payouts succeed or fail.
- Trigger notifications to your team or payees.
- Automate reconciliation and reporting.
Setting Up a Webhook Endpoint
A webhook endpoint is an HTTPS URL on your server that can acceptPOST requests.
When an event occurs, such as a payout completing, Acclaim sends a JSON payload to your endpoint.
Key considerations when building your endpoint:
- Must accept
POSTrequests with a JSON body. - Must return a
2xxHTTP status code to acknowledge receipt. - Should be idempotent (able to safely handle duplicate deliveries).
- Acclaim sends an event payload to your webhook URL.
- Your server processes the event.
- Your server responds with
200 OKto confirm receipt.
Installing Webhooks in the Console
You can install and manage webhook endpoints directly from the Acclaim Console under Settings → Developers → Webhooks.- Add one or more HTTPS URLs where Acclaim should send events.
- Choose which event types to subscribe to, or receive all events by default.
- Test delivery right from the console to verify your endpoint is working.
Event Payload Structure
All webhook events share a consistent format:The resource that changed (e.g., payout details). This will match the same format as retrieving the resource through the API.
Event Types
Payer Events
payer.createdpayer.updatedpayer.deleted
Payment Request Events
payment_request.createdpayment_request.updatedpayment_request.succeededpayment_request.failed- see Payment failures for failure code referencepayment_request.canceled
Setup Request Events
setup_request.createdsetup_request.updatedsetup_request.succeededsetup_request.failedsetup_request.canceled
Refund Events
refund.createdrefund.failedrefund.succeeded
Dispute Events
dispute.created
Payee Events
payee.createdpayee.updatedpayee.deleted
Payout Events
payout.createdpayout.updatedpayout.processingpayout.succeededpayout.failed
Payout Batch Events
payout_batch.createdpayout_batch.updatedpayout_batch.succeededpayout_batch.failedpayout_batch.canceled
Treasury Account Events
treasury.account.createdtreasury.account.updated
Treasury Transaction Events
treasury.transaction.created
Reliability & Retries
Acclaim automatically retries failed webhook deliveries for up to 48 hours using exponential backoff. Your endpoint should:- Be idempotent: safely handle duplicate events.
- Respond quickly: return
2xxas soon as the event is accepted, then process asynchronously if needed. - Log event
ids to avoid reprocessing the same event.
Securing Webhooks
Webhooks should be secure so only Acclaim can call them:- Use HTTPS for encryption.
- Verify the webhook signature before you process the event.
Signature verification
Each webhook request includes these headers:Acclaim-Timestamp- The Unix timestamp used when the request was signed.Acclaim-Signature- The HMAC signature for the request body, in the formatv1=<hex_digest>.
- Read the raw request body exactly as it was received.
- Read the
Acclaim-Timestampheader. - Build the signed payload as
timestamp.raw_body, with a literal.between the timestamp and raw body. - Compute an HMAC SHA-256 digest using your webhook endpoint secret.
- Prefix the digest with
v1=and compare it to theAcclaim-Signatureheader using a constant-time comparison. - Reject the request if the signature does not match.