Skip to main content

Processing Requirements

For every callback received, you must:
  1. Verify the signature first — See Authentication and Security for signature verification details
  2. Parse the business data and perform idempotent processing
  3. Return the agreed success response
Since the same business event may be delivered more than once, you must implement idempotency using a business-unique identifier. To reduce the risk of duplicate processing, premature final-state decisions, or incorrect fund posting, process callbacks in the following order:
  1. Validate headers and verify the signature
  2. Parse bizType, bizId, and bizStatus
  3. Run idempotency checks on the business-unique identifier
  4. Update local business state
  5. Return the success response
  6. Use query APIs for final confirmation on critical fund events
For payment, OTC, payout, and other fund-related flows, callbacks should usually be treated as the primary event source, while final confirmation for critical outcomes should still be verified through the relevant query APIs.

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:
HTTP 200 status is recommended to indicate successful receipt.

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 bizType rather 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 to bizType 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 general PAY 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 the PAY_REFUND callback type.
  • Use the merchant-side unique identifier refundRequestId as 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

  1. Receive the callback request
  2. Verify the signature using the merchant secret key (see Authentication and Security)
  3. Extract and parse the data field (JSON string → object)
  4. Check idempotency key (e.g., transactionId or merchantTradeNo)
  5. Store the notification durably before processing
  6. Process the business logic asynchronously
  7. Return {"returnCode": "SUCCESS", "returnMessage": ""} with HTTP 200
This design ensures reliability and prevents duplicate processing.

Event Catalog Summary

Processing Model

  • Route processing by bizType first instead of assuming every callback shares the same field set
  • Then evaluate bizStatus to determine whether the event is intermediate or terminal
  • Finally apply idempotent updates keyed by business identifiers such as merchantTradeNo, refundRequestId, or batch_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:
  1. the signature has been verified
  2. idempotency validation has passed
  3. the event has been persisted
  4. the local business record is updated consistently with the callback result