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
Message JSON example
bizType
Terminal states at a glance
See the full event catalog in the Guide.bizStatus enum (payment / address)
Subscription, OTC, institution, and unresolved-payment statuses are documented on their respective pages.

