Gateway Order Query
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):
| Parameter | Type | Required | Max | Description |
|---|---|---|---|---|
| mchNo | string | Yes | 32 | Merchant number |
| appId | string | No | 32 | Application ID |
| reqId / nonceStr / sign / reqTime | — | — | — | See Signature |
| orderNo | string | No* | 64 | Platform gateway order number |
| bizOrderNo | string | No* | 100 | Merchant 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):
| Field | Type | Description |
|---|---|---|
| orderNo | string | Platform gateway order number |
| bizOrderNo | string | Merchant order number |
| gatewayType | string | Gateway type (cashier / aggregate) |
| title | string | Title |
| description | string | Description |
| amount | long | Amount (cents) |
| currency | string | Currency |
| status | string | Business status (GatewayOrderStatusEnum) |
| expiredTime | string | Expiry time (UTC) |
| payTime | string | Payment success time (UTC) |
| channel | string | Payment channel (user's final choice) |
| method | string | Payment method |
| product | string | Payment product |
| tradeNo | string | Fund trade number |
| outOrderNo | string | Channel order number |
| fundStatus | string | Fund status (PayFundStatusEnum) |
| attach | string | Merchant custom data (returned as-is) |
| returnUrl | string | Sync redirect URL |
Gateway Order Status (GatewayOrderStatusEnum)
| status | Description |
|---|---|
| wait_pay | Waiting for payment |
| paying | Payment in progress |
| paid | Paid |
| failed | Payment failed |
| closed | Closed |
| expired | Expired |
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-01T04:05:00Z",
"channel": "wechat",
"method": "wechat_jsapi",
"tradeNo": "T2024120112345700001",
"fundStatus": "success",
"attach": "{\"orderId\": 123}",
"returnUrl": "https://your-domain.com/return"
},
"sign": "Base64Signature",
"resTime": "2024-12-01T04:20:00Z",
"reqId": "REQ20241201011"
}