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 (the refund and reward-distribution pages 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 standard-envelope callbacks,datais a JSON string — callJSON.parsebefore reading fields. Exception: Some payout-shaped payloads may omitdataand use a dedicated order list shape. On the EU site, prefer Reward Distribution Notification for batch reward callbacks. 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
On the EU site, documented callback pages cover payment, refund, and reward-distribution notifications:Terminal states at a glance
bizStatus enum (payment)
Other statuses may appear in production payloads but are not published in the EU API Reference.

