Reading path
We recommend this order when integrating notifications:- This page (overview) — shared envelope, retries, signature verification, and
bizTypereference - Business notification pages — field tables and examples (Payment / OTC / Payout / Subscription / Institution groups in this menu)
- Guide: Notification — event catalog, terminal-state handling, and product-to-
bizTypemapping - Best practices — payment query fallback, 10s refund rule, and security guidance
Overview
When order status changes (payment success, timeout, cancellation, closure, exception, and similar events), GatePay sends an asynchronous POST notification to the callback URL configured at merchant registration.- Delivery: GatePay delivers JSON notifications to your callback URL via POST.
- Retry: If delivery fails due to network or other issues, GatePay retries after 15 seconds (twice), 30 seconds, 3 minutes, 10 minutes, 20 minutes, 30 minutes (three times), 60 minutes, 3 hours (three times), and 6 hours (twice). If retries still fail, use the relevant query APIs to obtain the latest status.
- Idempotency: The same business event may be delivered more than once. Implement idempotent processing using business-unique identifiers such as
bizIdandmerchantTradeNo.
Processing requirements
- Verify signature: Validate the signature before processing business logic. Request headers include
X-GatePay-Timestamp,X-GatePay-Nonce, andX-GatePay-Signature. See Security and Signature. - Parse
data: For callbacks using the standard envelope,datais always a JSON string — callJSON.parsebefore reading fields. Payout (WITHDRAW) has nodatafield and uses the dedicatedmain_order+subordersshape (see Payout status notification). Top-levelclient_id/clientIdmay be absent or mixed; follow the actual callback. - Acknowledge: Return HTTP 200 with JSON
{"returnCode":"SUCCESS","returnMessage":""}after successful processing. ReturningFAILor timing out triggers retries.
Message structure
| Field | Description |
|---|---|
| bizType | Business type |
| bizId | Business ID |
| bizStatus | Business status |
| client_id / clientId | Application ClientId (field name varies; may be absent) |
| data | Business payload as a JSON string (WITHDRAW excepted; see payout notification page) |
Message JSON example
bizType
| bizType | Description |
|---|---|
PAY | Gate Pay order status |
PAY_FIAT | Fiat payment order status |
PAY_ADDRESS / TRANSFER_ADDRESS | Address payment status / fund credit |
PAY_FIXED_ADDRESS | Static address collection |
FIXED_ADDRESS_RISK | Static address risk |
PAY_REFUND | Refund status |
PAY_BATCH | Batch transfer / reward |
PAY_GIFT_BATCH | Gift card batch payment |
PAY_UNRESOLVED | Unresolved payment |
INSTITUTION | Institution sub-account result |
OTC | OTC on-ramp / off-ramp |
WITHDRAW | Payout / withdrawal batch |
SUBSCRIPTION_ORDER_STATUS | Subscription order status |
SUBSCRIPTION_PAYMENT / ACCOUNT_AUTH_DEDUCTION | Subscription / authorized deduction |
Terminal states at a glance
See the full event catalog in the Guide.| bizType | bizStatus (examples) | Terminal | Suggested action |
|---|---|---|---|
PAY / PAY_FIAT | PAY_SUCCESS | Yes | Mark paid and fulfill |
PAY / PAY_FIAT | PAY_ERROR / PAY_CLOSE | Yes | Mark failed/closed; stop polling |
PAY_REFUND | REFUND_PROCESS | No | Mark processing; wait or query |
PAY_REFUND | REFUND_SUCCESS / REFUND_REJECTED | Yes | Reconcile / manual review |
PAY_ADDRESS | PAY_EXPIRED_IN_PROCESS | No | Do not finalize until chain confirms |
TRANSFER_ADDRESS | TRANSFERRED_ADDRESS_BLOCK | Yes | Mark exceptional; do not credit |
PAY_FIXED_ADDRESS | PAY_BLOCK | Yes | Risk funds; do not credit |
WITHDRAW | WITHDRAW_SUCCESS / WITHDRAW_PARTIAL / WITHDRAW_FAIL | Yes | Reconcile batch and sub-orders |
INSTITUTION | INSTITUTION_ACCOUNT_FAIL | Yes | Record failure; manual follow-up |
bizStatus enum (payment / address)
| bizStatus | Description |
|---|---|
| PAY_SUCCESS | Payment successful |
| PAY_ERROR | Payment failed |
| PAY_CLOSE | Payment closed |
| PAY_BLOCK | Static address review / risk block |
| REFUND_SUCCESS | Refund successful |
| REFUND_PROCESS | Refund in process |
| REFUND_REJECTED | Refund rejected |
| PAY_EXPIRED_IN_PROCESS | Target amount reached during validity but on-chain records still unconfirmed |
| TRANSFERRED_ADDRESS_IN_TERM | Address credited within term |
| TRANSFERRED_ADDRESS_DELAY | Delayed address credit |
| CONVERT_ADDRESS_PAY_DELAY | Convert address payment delayed |
| TRANSFERRED_ADDRESS_BLOCK | Address transfer blocked |
| PAID | Batch order paid |
| RISK_ADDRESS | Fixed address risk |

