What are Webhooks?
Webhooks let you receive real-time HTTP notifications when key events happen on your Daya Coins account, so you never have to poll the API for order or transfer status.Webhooks are the recommended way to track order execution, deposits, and withdrawals. They deliver updates in real time and cut down on API load.
Supported Events
Events fire only on terminal transitions. The rail is carried inside
data.method (onchain or bank_transfer) and the flow direction in data.direction (in or out), so event names are not split per rail.Managing Webhooks
1
Create an endpoint
In the Dashboard, open your workspace’s Webhooks page and add your HTTPS
url with the events you want. The signing secret is shown only once.2
Store the secret
Save the secret in a secure store. You use it to verify every delivery. It is not retrievable later.
3
Verify and acknowledge
Verify the
X-Webhook-Signature on each request (see Verification) and return a 2xx status.4
Rotate when needed
Pause the webhook in the Dashboard, rotate it, copy the new secret, update your receiver, then re-enable delivery. Reconcile API state for the paused interval.
HTTP Headers
Every webhook request includes the following headers:Webhook Payload
All webhook events share the same envelope:Envelope Fields
string
Unique identifier for this event (UUID). Use it to deduplicate deliveries.
string
Event type:
order.filled, order.failed, deposit.completed, withdrawal.completed, or withdrawal.failed.string
When the event occurred (RFC3339).
object
Event-specific payload. Order events carry order fields; deposit and withdrawal events carry transaction fields.
Event Payloads
- order.filled
- order.failed
- deposit.completed
- withdrawal.completed
- withdrawal.failed
Sent when: an order reaches its terminal filled state.
Delivery Guarantees
At-least-once delivery
At-least-once delivery
Webhooks may be delivered more than once. Deduplicate using
event_id.Order not guaranteed
Order not guaranteed
Events may arrive out of order. Use
timestamp and the resource status to reconcile client-side.Retry behavior
Retry behavior
If your endpoint returns a non-2xx status or times out, Daya retries with exponential backoff across 10 attempts:
Timeout
Timeout
Your endpoint must respond within 30 seconds. Slower responses time out and trigger a retry.
Auto-disable
Auto-disable
A webhook is disabled automatically after 10 consecutive delivery failures. Fix the endpoint, then re-enable it from the Dashboard’s Webhooks page.
Delivery Statuses
Each delivery moves through these statuses:
Delivery logs — attempts, response codes, and retry state — are visible on the Dashboard’s Webhooks page, where failed deliveries can also be re-sent.
Implementing an Endpoint
Your endpoint must:- Verify the
X-Webhook-Signatureheader (see Verification). - Return a 2xx status to acknowledge receipt.
- Process quickly, or queue heavy work for async handling.
Best Practices
1
Verify signatures
Always verify
X-Webhook-Signature before trusting a payload. Strip the sha256= prefix before comparing.2
Handle idempotency
Deduplicate on
event_id. Store processed IDs so repeat deliveries are no-ops.3
Return 2xx quickly
Acknowledge immediately and queue heavy processing asynchronously.
4
Reconcile with the API
Periodically reconcile against List Orders and List Transactions in case a delivery was missed.
Next Steps
Signature Verification
Implement HMAC verification
Manage Webhooks
Create and manage webhook endpoints from your workspace’s Webhooks page.