Dubu uses webhooks to push real-time notifications to your server whenever something meaningful happens in your account. When an event fires, Dubu sends an HTTP POST request to every active endpoint subscribed to that event type. Your server should respond with aDocumentation Index
Fetch the complete documentation index at: https://docs.dubupay.com/llms.txt
Use this file to discover all available pages before exploring further.
2xx status code within 5 seconds to acknowledge receipt.
How delivery works
Each webhook request contains:- A JSON body with the event type, data payload, and a timestamp.
- An
X-Dubu-Signatureheader containing an HMAC-SHA256 signature you can use to confirm the request came from Dubu. - An
X-Dubu-Timestampheader with the ISO 8601 time the event was dispatched.
X-Dubu-Test-Mode: true so you can distinguish test events from live ones.
Payload shape
Every event payload follows this structure:The event type string, e.g.
deposit.settled.Event-specific data. The shape varies by event type; see the event catalogue below.
ISO 8601 timestamp of when the event was dispatched.
Verifying signatures
Every request from Dubu includes anX-Dubu-Signature header in the format sha256=<hex_digest>. You should always verify this signature before processing an event to ensure it was not tampered with in transit.
To verify, compute an HMAC-SHA256 of the raw request body using your endpoint’s signing secret, then compare it to the value in the header. Use a constant-time comparison to prevent timing attacks.
Node.js example
Buffer before reading it as JSON. If your framework parses JSON first, the raw body is no longer available and signature verification will fail.
Retry policy
If your endpoint returns a non-2xx response, times out, or is unreachable, Dubu retries delivery with exponential back-off. Check your delivery logs to see failed attempts and their error details. To avoid duplicate processing, make your event handlers idempotent — use theevent type and the id in the data payload as a deduplication key.
Event catalogue
Deposit events
These events fire as a deposit progresses through its lifecycle.| Event | Description |
|---|---|
deposit.received | A deposit was detected and is pending FX conversion. |
deposit.pending_withdrawal | FX conversion is complete; the crypto is being sent out. |
deposit.settled | The deposit has fully settled. The customer’s balance is credited. |
deposit.failed | The deposit could not be processed. |
deposit.flagged | The deposit was flagged for review. |
deposit.completed | Alias for deposit.settled in some integration flows. |
deposit.settled payload
deposit.failed payload
Withdrawal events
| Event | Description |
|---|---|
withdrawal.completed | A crypto withdrawal has been submitted and settled on-chain. |
withdrawal.completed payload
Customer events
| Event | Description |
|---|---|
customer.created | A new customer was created under your account. |
customer.verified | A customer passed basic verification. |
customer.tier1_verified | A customer’s Tier 1 KYC was approved. |
customer.tier2_verified | A customer’s Tier 2 KYC was approved. |
customer.tier2_rejected | A customer’s Tier 2 KYC application was rejected. |
customer.balance.credited | A customer’s internal balance was credited (e.g. after a deposit). |
customer.balance.refunded | A customer’s balance was refunded (e.g. after a failed transfer). |
customer.balance.credited payload
Checkout events
| Event | Description |
|---|---|
checkout.payment.completed | A customer completed payment on a checkout link. The linked invoice (if any) is marked as paid. |
checkout.payment.completed payload
Onramp and transfer events
| Event | Description |
|---|---|
onramp.completed | A virtual account (onramp) became active. |
offramp.completed | An offramp transaction completed. |
transfer.completed | An internal transfer completed. |
payout.completed | A payout was processed. |
virtual_account.created | A new virtual bank account was provisioned for a customer. |
Best practices
Respond quickly. Your endpoint must return a response within 5 seconds. If you need to do heavy processing, return200 OK immediately and handle the event asynchronously (e.g. push to a queue).
Use idempotency keys. The same event can be delivered more than once due to retries. Use the id field inside data (or the combination of event + id) as a deduplication key in your database.
Verify every signature. Always check the X-Dubu-Signature header before trusting an incoming payload. Reject requests that fail verification with a 401 status.
Use HTTPS. Dubu only delivers events to HTTPS endpoints. Plain HTTP URLs are rejected at registration time.
Monitor your logs. Check the delivery logs endpoint regularly to catch failed deliveries early.