Skip to main content
WEBHOOK

Overview

This page documents webhook callbackWebhook. The full schema, parameters, and examples are rendered from the linked OpenAPI or webhook definition above. When batch withdrawal/payout status changes, GatePay notifies your callback URL using the dedicated WITHDRAW payload (no data field).

Notes

Trigger Scenarios

  • When a batch withdrawal/payout order status changes (all succeeded, all failed, or partially succeeded), GatePay sends a notification to the callback URL configured at merchant registration
  • If delivery fails, see retry rules in Notifications Overview.
Scope: Batch and sub-order withdrawal/payout status changes, corresponding to bizType=WITHDRAW in the general callback taxonomy. For integration guidance, see Payout.

bizType Reference

In the Notifications Overview bizType enumeration, withdrawal notifications use WITHDRAW to indicate withdrawal/payout status changes. Unlike payment or refund callbacks that use the standard envelope (bizType, bizId, bizStatus, client_id, data), WITHDRAW callbacks use a dedicated payload: the request body contains main_order (batch header) and suborders (line items) directly, with batch status in main_order.status.

bizStatus Values

Terminal notification semantics align with the bizStatus values below. Batch progress is also reflected in main_order.status (including intermediate values such as INIT and PROCESSING).

Message Structure

Example Message

Batch Status (main_order.status)

Typical callback sequence: INITPROCESSING → terminal state (SUCCESS / PARTIAL / FAIL).

main_order Field Reference

suborders Item Fields

Use batch_id + merchant_withdraw_id as the idempotency key to avoid duplicate updates. If no callback is received for an extended period, poll via Withdrawal query.

Callback Example

Batch withdrawal fully succeeded (main_order.status=SUCCESS)

Partial success (main_order.status=PARTIAL)

All failed (main_order.status=FAIL)

Body

application/json

Data structure for GatePay callback to merchant when withdrawal order status changes, including main order object and suborder array.

main_order
object
required

Main withdrawal order information in callback notification.

suborders
object[]
required

Suborder callback details array.

Response

200 - application/json

Returns HTTP 200 to indicate the notification has been received successfully.

Response body returned by the merchant after receiving the notification.

returnCode
string
required

Return status code; SUCCESS indicates successful processing.

returnMessage
string | null

Return message; may be empty on success.