Skip to main content
POST
/
v1
/
pay
/
withdraw
/
query
Query withdrawal order 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"
      }
    ]
  }
}

Headers

X-GatePay-Certificate-ClientId
string
required

The clientId assigned when the merchant registers an application in the Gate merchant console.

Example:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
required

Request signature. GatePay uses this signature to verify whether the request is valid.

X-GatePay-Timestamp
string
required

UTC timestamp in milliseconds when the request is generated. GatePay will not process requests where the difference from the receive time exceeds 10 seconds.

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random string. Must comply with HTTP header rules; recommended length is within 32 characters, composed of digits and letters.

Example:

"9578"

Body

application/json

Request body for querying batch withdrawal status.

batch_id
string
required

Unique batch ID generated by the merchant at /v1/pay/withdraw.

detail_status
string
required

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.

Response

200 - application/json

Withdrawal batch details

Response body for querying batch withdrawal status.

status
string
required

Main order status: INIT (newly created order), PROCESSING (newly created payout order is in processing), PARTIAL (partially successful), FAIL (fully failed), SUCCESS (fully successful)

code
string
required

Error code

errorMessage
string

Error message

data
object

Batch withdrawal details