What are Webhooks?
Webhooks let you receive real-time HTTP notifications when deposit, withdrawal, payout, or onramp lifecycle events occur, instead of polling the API for status changes.Webhooks are the recommended way to track deposit settlement, merchant withdrawal progress, payout delivery, and onramp state changes.
Supported Events
Deposit Events:| Event | Resource | Description |
|---|---|---|
deposit.received | Deposit | Deposit received (NGN or crypto) |
deposit.flagged | Deposit | Deposit flagged for review |
deposit.pending_withdrawal | Deposit | Deposit pending on-chain withdrawal |
deposit.settled | Deposit | Deposit fully settled |
deposit.failed | Deposit | Deposit failed |
| Event | Resource | Description |
|---|---|---|
withdrawal.submitted | Withdrawal | Withdrawal submitted to chain |
withdrawal.settled | Withdrawal | Withdrawal confirmed on-chain |
withdrawal.failed | Withdrawal | Withdrawal failed |
| Event | Resource | Description |
|---|---|---|
payout.created | Payout | Payout created and being processed |
payout.settled | Payout | Payout successfully settled |
payout.failed | Payout | Payout failed |
| Event | Resource | Description |
|---|---|---|
onramp.created | Onramp | Onramp created |
onramp.completed | Onramp | Onramp completed |
onramp.failed | Onramp | Onramp failed |
Webhook Configuration
Configure webhook endpoints in your Daya Dashboard:- Navigate to Webhooks
- Add your webhook URL
- Generate or copy your webhook secret
- Subscribe to the events you want to receive
Webhook Payload
All merchant webhooks use the same envelope:Common Fields
Event type, such as
deposit.settled or withdrawal.failed.RFC3339 timestamp for when the event was emitted.
Resource payload for the event. The shape depends on the event type — deposit events send a deposit object, withdrawal events send a withdrawal object, payout events send a payout object, and onramp events send an onramp object.
Delivery Guarantees
At-least-once delivery
At-least-once delivery
Webhooks may be delivered more than once. Your handler must deduplicate repeated deliveries.
Order not guaranteed
Order not guaranteed
Events can arrive out of order. Use the
timestamp field to order updates client-side.Retry behavior
Retry behavior
If your endpoint returns a non-2xx response or times out, Daya retries with backoff. Build your handler to be safe for repeated delivery.
Timeout
Timeout
Respond quickly and offload heavy work asynchronously. Slow handlers increase duplicate deliveries.
Webhook Verification
All webhook requests include an HMAC-SHA256 signature in theX-Daya-Signature header.
See Webhook Verification for implementation details.
Implementing a Webhook Endpoint
Your endpoint should:- Verify the signature
- Build a stable deduplication key from the payload
- Return
2xxquickly - Process the event asynchronously if work is non-trivial
Best Practices
Deduplicate deliveries
Store a stable deduplication key derived from
event, timestamp, and the underlying resource ID.Handle out-of-order events
Use
timestamp and the underlying resource state to reconcile event order safely.Testing Webhooks
For deposit webhook flows:- Create a sandbox onramp
- Trigger a sandbox deposit with Create a sandbox deposit
- Observe the resulting deposit lifecycle webhooks
- Fund merchant balance through a merchant-balance settlement flow
- Create a withdrawal
- Observe
withdrawal.submitted,withdrawal.settled, orwithdrawal.failed
Troubleshooting
Webhooks not received
Webhooks not received
Check endpoint reachability, TLS configuration, and whether your handler is returning non-2xx responses.
Duplicate deliveries
Duplicate deliveries
Duplicate delivery is expected under at-least-once semantics. Deduplicate using a stable payload-derived key.
Out-of-order events
Out-of-order events
Sort or reconcile events using
timestamp instead of arrival order.Signature verification fails
Signature verification fails
Verify you are using the correct webhook secret and the raw request body.
Next Steps
Webhook Events
Detailed deposit and withdrawal event schemas
Signature Verification
Implement HMAC verification