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
{
"event_type": "order_status_changed",
"subject_type": "Order",
"subject_id": "c9d5e882-5ea9-47de-8e49-08b4fe35056e",
"payload": {
"order": {
"id": "c9d5e882-5ea9-47de-8e49-08b4fe35056e",
"status": "transfer_pending",
"created_at": 1758698269,
"user_confirmed_payment": false,
"withdraw_address": {
"address": "8q9h2h9676VcMU6YjxTC5kCp2jT1fMgCa1HbJNX4VxFf"
},
"pair": {
"id": "SOLUSDTSOL",
"from_token": {
"id": "usdt",
"name": "USDT",
"full_name": "Tether",
"icon": "https://sfo2.digitaloceanspaces.com/exchange-widget/uploads/token/icon/usdt/usdt.png",
"decimals_before": 18,
"decimals_after": 3
},
"from_chain": {
"id": "sol",
"name": "Solana",
"icon": "https://sfo2.digitaloceanspaces.com/exchange-widget/uploads/chain/icon/sol/sol.png",
"token_icon": "https://sfo2.digitaloceanspaces.com/exchange-widget/uploads/pair/from_token_icon/SOLUSDTSOL/usdt.png"
},
"to_token": {
"id": "sol",
"name": "SOL",
"full_name": "Solana",
"icon": "https://sfo2.digitaloceanspaces.com/exchange-widget/uploads/token/icon/sol/sol.png",
"decimals_before": 18,
"decimals_after": 5
},
"to_chain": {
"id": "sol",
"name": "Solana",
"icon": "https://sfo2.digitaloceanspaces.com/exchange-widget/uploads/chain/icon/sol/sol.png"
}
},
"min_deposit_amount": "11.934",
"max_deposit_amount": "134309484.591624",
"rate": "0.004645552",
"unique_reference": "OAFQJP",
"withdrawal_fee": "0.00204937",
"deposit_address": {
"address": "4J7KthvURfcMBhZzYH6wXWnfPCXd2mjgJTGrUziP4hcU"
},
"expires_at": 1758698870
}
},
"created_at": "2025-09-24T07:17:52Z"
}Last updated
