Skip to main content

Reading path

We recommend this order when integrating notifications:
  1. This page (overview) — shared envelope, retries, signature verification, and bizType reference
  2. Business notification pages — field tables and examples (Payment / OTC / Payout / Subscription / Institution groups in this menu)
  3. Guide: Notification — event catalog, terminal-state handling, and product-to-bizType mapping
  4. 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 bizId and merchantTradeNo.

Processing requirements

  1. Verify signature: Validate the signature before processing business logic. Request headers include X-GatePay-Timestamp, X-GatePay-Nonce, and X-GatePay-Signature. See Security and Signature.
  2. Parse data: For callbacks using the standard envelope, data is always a JSON string — call JSON.parse before reading fields. Payout (WITHDRAW) has no data field and uses the dedicated main_order + suborders shape (see Payout status notification). Top-level client_id / clientId may be absent or mixed; follow the actual callback.
  3. Acknowledge: Return HTTP 200 with JSON {"returnCode":"SUCCESS","returnMessage":""} after successful processing. Returning FAIL or timing out triggers retries.

Message structure

FieldDescription
bizTypeBusiness type
bizIdBusiness ID
bizStatusBusiness status
client_id / clientIdApplication ClientId (field name varies; may be absent)
dataBusiness payload as a JSON string (WITHDRAW excepted; see payout notification page)

Message JSON example

{
  "bizType": "PAY",
  "bizId": "order_123456",
  "bizStatus": "PAY_SUCCESS",
  "client_id": "your_client_id",
  "data": "{...}"
}

bizType

bizTypeDescription
PAYGate Pay order status
PAY_FIATFiat payment order status
PAY_ADDRESS / TRANSFER_ADDRESSAddress payment status / fund credit
PAY_FIXED_ADDRESSStatic address collection
FIXED_ADDRESS_RISKStatic address risk
PAY_REFUNDRefund status
PAY_BATCHBatch transfer / reward
PAY_GIFT_BATCHGift card batch payment
PAY_UNRESOLVEDUnresolved payment
INSTITUTIONInstitution sub-account result
OTCOTC on-ramp / off-ramp
WITHDRAWPayout / withdrawal batch
SUBSCRIPTION_ORDER_STATUSSubscription order status
SUBSCRIPTION_PAYMENT / ACCOUNT_AUTH_DEDUCTIONSubscription / authorized deduction

Terminal states at a glance

See the full event catalog in the Guide.
bizTypebizStatus (examples)TerminalSuggested action
PAY / PAY_FIATPAY_SUCCESSYesMark paid and fulfill
PAY / PAY_FIATPAY_ERROR / PAY_CLOSEYesMark failed/closed; stop polling
PAY_REFUNDREFUND_PROCESSNoMark processing; wait or query
PAY_REFUNDREFUND_SUCCESS / REFUND_REJECTEDYesReconcile / manual review
PAY_ADDRESSPAY_EXPIRED_IN_PROCESSNoDo not finalize until chain confirms
TRANSFER_ADDRESSTRANSFERRED_ADDRESS_BLOCKYesMark exceptional; do not credit
PAY_FIXED_ADDRESSPAY_BLOCKYesRisk funds; do not credit
WITHDRAWWITHDRAW_SUCCESS / WITHDRAW_PARTIAL / WITHDRAW_FAILYesReconcile batch and sub-orders
INSTITUTIONINSTITUTION_ACCOUNT_FAILYesRecord failure; manual follow-up

bizStatus enum (payment / address)

bizStatusDescription
PAY_SUCCESSPayment successful
PAY_ERRORPayment failed
PAY_CLOSEPayment closed
PAY_BLOCKStatic address review / risk block
REFUND_SUCCESSRefund successful
REFUND_PROCESSRefund in process
REFUND_REJECTEDRefund rejected
PAY_EXPIRED_IN_PROCESSTarget amount reached during validity but on-chain records still unconfirmed
TRANSFERRED_ADDRESS_IN_TERMAddress credited within term
TRANSFERRED_ADDRESS_DELAYDelayed address credit
CONVERT_ADDRESS_PAY_DELAYConvert address payment delayed
TRANSFERRED_ADDRESS_BLOCKAddress transfer blocked
PAIDBatch order paid
RISK_ADDRESSFixed address risk
Subscription, OTC, institution, and unresolved-payment statuses are documented on their respective pages.