Processing Requirements
For every callback received, you must:- Verify the signature first — See Authentication and Security for signature verification details
- Parse the business data and perform idempotent processing
- Return the agreed success response
Recommended Processing Order
To reduce the risk of duplicate processing, premature final-state decisions, or incorrect fund posting, process callbacks in the following order:- Validate headers and verify the signature
- Parse
bizType,bizId, andbizStatus - Run idempotency checks on the business-unique identifier
- Update local business state
- Return the success response
- Use query APIs for final confirmation on critical fund events
Trigger and Retry Mechanism
Trigger When the order status changes (payment success, timeout, cancellation, closure, or exception), GatePay sends a notification to your configured callback URL. Retry If you do not return the agreed success response or the request times out, GatePay will retry the callback. Signature Verification You must verify all callback signatures before processing. See Authentication and Security for details.Callback Message Structure
All callbacks contain the following top-level fields:
Example Callback:
Callback Acknowledgement Response
Return the following JSON response with HTTP 200:bizType Enumeration
General Notes
- This notification chapter explains the shared rules for payment, refund, address collection, static-address collection, payout, and institution-related callbacks.
- Detailed callback interpretation for each business flow should still be read together with the corresponding product guide and API Reference.
- If your integration uses multiple payment methods, route processing by
bizTyperather than assuming all callbacks share the same field set. - Do not rely on a single callback alone to finalize financial state changes in critical flows; combine callbacks with the appropriate query or detail endpoint when needed.
Payment Product to bizType Mapping
If your integration covers multiple payment products, define the internal routing model from product flow tobizType first:
This page already includes the event catalog summary and terminal-state handling guidance, so you can continue reading the business-specific sections below.
Hosted Checkout Payment Notification
Hosted checkout payments follow the generalPAY callback model. For non-address payments, interpret the payment amount using orderAmount. For more details on payment integrations, see Payments.
Refund Notifications
Refund orders use thePAY_REFUND callback type.
- Use the merchant-side unique identifier
refundRequestIdas the primary key for refund query and reconciliation. - API-initiated refunds and refunds triggered manually in the merchant console are different operational entry points; the callback description in this documentation applies to API integrations.
- For reliable refund status handling, combine callbacks with the refund query endpoints.
Address Payment Notifications
PAY_ADDRESS Status Enumeration
PAY_ADDRESS data Fields
TRANSFER_ADDRESS Status Enumeration
TRANSFER_ADDRESS data Fields
Note: In historical payloads or different business flows, the transaction hash field may appear as
txHash, tx_hash, or hash, so parsers should handle these variants compatibly.
CHAIN_ADDRESS Status Enumeration
CHAIN_ADDRESS data Fields
Static Address Collection Notification
bizType:PAY_FIXED_ADDRESS
bizStatus: PAY_SUCCESS (credit succeeded)
data Fields
Success Response:
Withdrawal / Payout Callbacks
For withdrawal and payout operations, see Payout for detailed callback structures and field descriptions. bizType:WITHDRAW
Main Order Fields
Sub-order Fields
Institution API Callbacks
bizType:INSTITUTION
bizStatus: INSTITUTION_ACCOUNT_SUCCESS or INSTITUTION_ACCOUNT_FAIL
For institution account-related notifications, see Institutional API.
data Fields (JSON string)
Callback Integration Guide
Integration Requirements
Recommended Processing Flow
- Receive the callback request
- Verify the signature using the merchant secret key (see Authentication and Security)
- Extract and parse the
datafield (JSON string → object) - Check idempotency key (e.g., transactionId or merchantTradeNo)
- Store the notification durably before processing
- Process the business logic asynchronously
- Return
{"returnCode": "SUCCESS", "returnMessage": ""}with HTTP 200
Related Documentation
- Authentication and Security — Signature verification and security practices
- Payments — Payment callback details
- Payout — Payout callback details
- Institutional API — Institution callback details
Event Catalog Summary
Processing Model
- Route processing by
bizTypefirst instead of assuming every callback shares the same field set - Then evaluate
bizStatusto determine whether the event is intermediate or terminal - Finally apply idempotent updates keyed by business identifiers such as
merchantTradeNo,refundRequestId, orbatch_id
Event Catalog
Terminal-State Handling Rules
For terminal events, it is best to advance downstream business only after all of the following are true:- the signature has been verified
- idempotency validation has passed
- the event has been persisted
- the local business record is updated consistently with the callback result

