Skip to content

Gateway Order Query

Updated: 9/11/26, 8:21:59 PM

Description

Query details of a gateway order created via Gateway Pre-pay.

Request

POST /unipay/gateway/query

  • Auth: RSA signature (@PaymentVerify)
  • Response: DaxResult<GatewayOrderResult>

Parameters

Inherits PaymentCommonParam (no merchant-only fields beyond mchNo, which is required):

ParameterTypeRequiredMaxDescription
mchNostringYes32Merchant number
appIdstringNo32Application ID
reqId / nonceStr / sign / reqTimeSee Signature
orderNostringNo*64Platform gateway order number
bizOrderNostringNo*100Merchant order number

*At least one required. Priority: orderNo > bizOrderNo

Example

json
{
  "mchNo": "M200000001",
  "reqId": "REQ20241201011",
  "reqTime": "2024-12-01 12:20:00",
  "sign": "Base64Signature",
  "orderNo": "G2024120112345700001"
}

Response

DaxResult<GatewayOrderResult>, data fields (18 fields):

FieldTypeDescription
orderNostringPlatform gateway order number
bizOrderNostringMerchant order number
gatewayTypestringGateway type (cashier / aggregate)
titlestringTitle
descriptionstringDescription
amountlongAmount (cents)
currencystringCurrency
statusstringBusiness status (GatewayOrderStatusEnum)
expiredTimestringExpiry time (Beijing time, yyyy-MM-dd HH:mm:ss)
payTimestringPayment success time (Beijing time, yyyy-MM-dd HH:mm:ss)
channelstringPayment channel (user's final choice)
methodstringPayment method
productstringPayment product
tradeNostringFund trade number
outOrderNostringChannel order number
fundStatusstringFund status (PayFundStatusEnum)
attachstringMerchant custom data (returned as-is)
returnUrlstringSync redirect URL

Gateway Order Status (GatewayOrderStatusEnum)

statusDescription
wait_payWaiting for payment
payingPayment in progress
paidPaid
failedPayment failed
closedClosed
expiredExpired

Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "orderNo": "G2024120112345700001",
    "bizOrderNo": "ORDER20241201001",
    "gatewayType": "cashier",
    "title": "Test Product",
    "amount": 100,
    "currency": "CNY",
    "status": "paid",
    "payTime": "2024-12-01 12:05:00",
    "channel": "wechat",
    "method": "wechat_jsapi",
    "tradeNo": "T2024120112345700001",
    "fundStatus": "success",
    "attach": "{\"orderId\": 123}",
    "returnUrl": "https://your-domain.com/return"
  },
  "sign": "Base64Signature",
  "resTime": "2024-12-01 12:20:00",
  "reqId": "REQ20241201011"
}

Official Website · Released under the GNU LGPL v3.0