curl --request POST \
--url https://openplatform.gateapi.io/v1/pay/withdraw/query \
--header 'Content-Type: application/json' \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
--data '
{
"batch_id": "237394559478075555",
"detail_status": "ALL"
}
'{
"status": "SUCCESS",
"code": "000000",
"errorMessage": "",
"data": {
"batch_id": "237394559478075350",
"merchant_id": 10002,
"client_id": "mZ96D37oKk-HrWJc",
"status": "FAIL",
"create_time": 1726055849126,
"channel_id": "123456",
"withdraw_list": [
{
"id": 35,
"batch_id": "237394559478075350",
"merchant_id": 10002,
"suborder_id": "268830764354768896",
"chain": "ETH",
"address": "0x1234567890abcdef",
"currency": "USDT",
"amount": "1",
"fee": "0",
"tx_id": "",
"timestamp": 0,
"memo": "Payment for services-1",
"status": "FAIL",
"merchant_withdraw_id": "M137394559478075550",
"err_msg": "unexpected http code error",
"client_id": "mZ96D37oKk-HrWJc",
"create_time": 1726055848856,
"update_time": 1726055856011,
"channel_id": "123456",
"fee_type": 1,
"done_amount": "1"
},
{
"id": 36,
"batch_id": "237394559478075350",
"merchant_id": 10002,
"suborder_id": "268830764354768897",
"chain": "ETH",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"currency": "USDT",
"amount": "0.001",
"fee": "0",
"tx_id": "",
"timestamp": 0,
"memo": "Payment for services-1",
"status": "FAIL",
"merchant_withdraw_id": "M137394559478075551",
"err_msg": "unexpected http code error",
"client_id": "mZ96D37oKk-HrWJc",
"create_time": 1726055848856,
"update_time": 1726055856010,
"channel_id": "123456",
"fee_type": 1,
"done_amount": "0.001"
}
]
}
}Query the status and details of a batch withdrawal order and its sub-orders by batch ID and detail status.
curl --request POST \
--url https://openplatform.gateapi.io/v1/pay/withdraw/query \
--header 'Content-Type: application/json' \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
--data '
{
"batch_id": "237394559478075555",
"detail_status": "ALL"
}
'{
"status": "SUCCESS",
"code": "000000",
"errorMessage": "",
"data": {
"batch_id": "237394559478075350",
"merchant_id": 10002,
"client_id": "mZ96D37oKk-HrWJc",
"status": "FAIL",
"create_time": 1726055849126,
"channel_id": "123456",
"withdraw_list": [
{
"id": 35,
"batch_id": "237394559478075350",
"merchant_id": 10002,
"suborder_id": "268830764354768896",
"chain": "ETH",
"address": "0x1234567890abcdef",
"currency": "USDT",
"amount": "1",
"fee": "0",
"tx_id": "",
"timestamp": 0,
"memo": "Payment for services-1",
"status": "FAIL",
"merchant_withdraw_id": "M137394559478075550",
"err_msg": "unexpected http code error",
"client_id": "mZ96D37oKk-HrWJc",
"create_time": 1726055848856,
"update_time": 1726055856011,
"channel_id": "123456",
"fee_type": 1,
"done_amount": "1"
},
{
"id": 36,
"batch_id": "237394559478075350",
"merchant_id": 10002,
"suborder_id": "268830764354768897",
"chain": "ETH",
"address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"currency": "USDT",
"amount": "0.001",
"fee": "0",
"tx_id": "",
"timestamp": 0,
"memo": "Payment for services-1",
"status": "FAIL",
"merchant_withdraw_id": "M137394559478075551",
"err_msg": "unexpected http code error",
"client_id": "mZ96D37oKk-HrWJc",
"create_time": 1726055848856,
"update_time": 1726055856010,
"channel_id": "123456",
"fee_type": 1,
"done_amount": "0.001"
}
]
}
}The clientId assigned when the merchant registers an application in the Gate merchant console.
"4186d0c6-6a35-55a9-8dc6-5312769dbff8"
Request signature. GatePay uses this signature to verify whether the request is valid.
UTC timestamp in milliseconds when the request is generated. GatePay will not process requests where the difference from the receive time exceeds 10 seconds.
"1672905655498"
Random string. Must comply with HTTP header rules; recommended length is within 32 characters, composed of digits and letters.
"9578"
Request body for querying batch withdrawal status.
Unique batch ID generated by the merchant at /v1/pay/withdraw.
Query status of sub-orders
ALL: all sub-orders
INIT :new added sub-orders
PENDING: pending sub-orders
PROCESSING: submitted withdrawal request, pending confirmation
CHECK: in review
FAIL: failed sub-orders
DONE: successful sub-orders.
Withdrawal batch details
Response body for querying batch withdrawal status.
Main order status: INIT (newly created order), PROCESSING (newly created payout order is in processing), PARTIAL (partially successful), FAIL (fully failed), SUCCESS (fully successful)
Error code
Error message
Batch withdrawal details
Show child attributes