Webhooks
ZayPay can notify your app in real time when an order status changes.
This is useful for dApps like wallets or launchpads to:
Update user balances immediately
Trigger notifications (e.g. when a swap completes or fails)
Start follow-up workflows
Setup
π To enable webhooks, contact your Zay Pay account manager and provide them with the HTTPS URL of your webhook endpoint.
Requirements:
The URL must be HTTPS (in production)
Must accept POST requests
Must return a 2xx response on success
Webhook Body Format
Each webhook request is sent as a JSON object in the request body.
event_type
string
Type of the event. Possible values: order_status_changed.
subject_type
string
Type of the object that triggered the event. Possible values: Order.
subject_id
string
Unique identifier (UUID) of the object that triggered the event.
payload
object
The object data. For orders, this is a full Order object. See the API reference for full schema.
Events
order_status_changed
Sent whenever an orderβs status changes.
Order Status Values
The payload.order.status field can take the following values:
creatingβ Order is being createdtransfer_pendingβ Waiting for depositdeposit_receivedβ Deposit confirmedcompletedβ Order completed successfullycancelledβ Order was cancelled or expiredkyc_requiredβ KYC verification neededrefund_initiatedβ Refund process startedrefund_completedβ Refund completedrefund_failedβ Refund failedcreation_blockedβ Order creation blockedcreation_rate_limitedβ Too many requests, creation rate limiteddeposit_onlyβ Deposit-only mode (e.g. SOL to SOL)
Payload Example
Last updated
