Skip to main content
POST
/
v1
/
pay
/
order
/
query
Order status query interface
curl --request POST \
  --url https://openplatform.gateapi.io/v1/pay/order/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 '
{
  "prepayId": "56416503889661952"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "errorMessage": "",
  "data": {
    "prepayId": "56335302571069440",
    "merchantId": 10002,
    "merchantTradeNo": "118223456798",
    "transactionId": "",
    "goodsName": "NF2T",
    "currency": "USDT",
    "orderAmount": "1.9",
    "surchargeAmount": "0",
    "fiatCurrency": "",
    "fiatAmount": "",
    "fiatRate": "",
    "status": "EXPIRED",
    "createTime": 1675392982792,
    "expireTime": 1675396480000,
    "transactTime": 0,
    "order_name": "MiniApp-Payment#118223456798",
    "pay_currency": "",
    "pay_amount": "0",
    "expectCurrency": "BTC",
    "channelId": "",
    "rate": "0"
  }
}
API description: Order status query interface

Headers

X-GatePay-Certificate-ClientId
string
required

Merchant client ID, obtained from GatePay platform

Example:

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

X-GatePay-Signature
string
required

HMAC-SHA256 signature for request validation

Example:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"

X-GatePay-Timestamp
string
required

Timestamp in milliseconds, must not differ from server time by more than 5 minutes

Example:

"1672905655498"

X-GatePay-Nonce
string
required

Random nonce for replay attack prevention

Example:

"9578"

Body

application/json
prepayId
string

Prepayment ID. Either prepayId or merchantTradeNo must be provided.

merchantTradeNo
string

Merchant order ID. Either prepayId or merchantTradeNo must be provided.

Response

200 - application/json

success

status
string

Payment status

code
string

Error code

errorMessage
string

Error message

data
object
description
any