Payout
Reward Distribution Notification
When a batch transfer order status changes, GatePay sends a webhook with bizType PAY_BATCH.
Verify the signature and return {"returnCode":"SUCCESS","returnMessage":""} after successful processing. On delivery failure, GatePay retries at the intervals documented in Notifications Overview.
WEBHOOK
Overview
This page documents asynchronous order-status notifications for reward distribution, corresponding towebhook batchTransferWebhook.
Based on the current implementation, this notification is sent by the batch processing task after all sub-orders succeed:
- Call site:
BatchTransferProcessTask(line 187) - Send method:
BatchNotifyService.batchNotify(...)
bizTypeis alwaysPAY_BATCHbizIdis the batch order ID (batchTransferModel.getBatchId())bizStatusis the batch order status (on this send path it isPAID)datais a JSON string fromJSON.toJSONString(batchOrderNotify)
Notes
- Signature verification, retries, and success response: Notifications Overview.
- Signing rules: Security and Signature.
- Prefer idempotency on
merchant_batch_no+reward_id. - If a notification is delayed, call Merchant batch transfer order query for reconciliation.
Trigger scenarios
In the current code, reward-distribution notifications are sent only when the entire batch succeeds:BatchTransferProcessTaskfirst checks batch processing status- When the status is
BatchTransferProcessStatusEnum.AllPaid - It calls
batchNotifyService.batchNotify(batchTransferModel.getMerchantBatchNo(), batchTransferModel, batchTransferProcessStatus.getTransferOrderModels())
bizStatus and each sub-order status in examples on this path should match the success scenario.
Message structure
Example message
data fields
After parsing data, the object fields are:
batchItemList item fields
Code mapping
The payload is built byBatchNotifyService.batchNotify(...):
- Top-level notification fields:
bizType = BizTypeEnum.PAY_BATCH.getType()bizId = batchTransferModel.getBatchId()bizStatus = batchTransferModel.getStatus()data = JSON.toJSONString(batchOrderNotify)
- Inner
batchOrderNotifyfields indata:currencymerchant_batch_nobatchItemList
batchItemListitem fields:receiver_idamountcurrencystatusreward_idcreate_timechannel_id
Callback example
Reward distribution batch success
Integration tips
- Verify the signature before parsing the body.
- Deserialize
dataas JSON, then readmerchant_batch_noandbatchItemList. - Identify the batch with
merchant_batch_noand each reward withreward_id. - Treat each item’s
statusas the actual payout result. - After successful handling, return HTTP 200 with the standard success body:
Body
application/json
Business type; always PAY_BATCH.
Available options:
PAY_BATCH Batch order ID.
Batch order status; commonly PAID when transfer/reward completes.
Available options:
PAID Business data as a JSON string; parsed structure see batchTransferData.
Merchant client_id that created the order.
Parsed batch transfer details from data.
Response
200 - application/json
HTTP 200 indicates the merchant successfully received the notification.

