Skip to main content

查询订单状态

查询订单状态

Request#

POST

/gateway/query

Parameter#

application/json

FieldTypeDescription
merchantCodestring [5..50] charactersUnique merchant code
queryTypestringEnum: "ORDER_QUERY" "REFUND_QUERY" "CASH_QUERY"
query type:
ORDER_QUERY: query pay order
REFUND_QUERY: query refund order
orderNumstringThis number should be unique for merchant. Dupliated numbers won't be accepted by platform.
dateTimestring <date-time>format yyyyMMddHHmmss
appIdstring NullableApplication ID. Merchants can create their own applications according to the business. This field is optional.
signstring <=512 charactersEncrypted parameters.

Request Example#

{
"merchantCode": "S2020198627344",
"queryType": "ORDER_QUERY",
"orderNum": "T202007183457183",
"dateTime": "20190824141522",
"appId": "4023123456",
"sign": "MIGfMA0GCSqGSI...w1ypbiy7VhIoFJbgSYSSHdC"
}

Response#

Success#

200 application/json

FieldTypeDescription
platRespCodestringresult code: "SUCCESS" "FAIL" "UNKNOWN" "NOTEXIST" "ERROR"
platRespMessagestringdescription of resp code
platOrderNumstringunique order number in platform wide.
orderNumstringunique order number in merchant wide. Same as orderNum in request body.
amountnumber <int64>The amount user has paid.
feenumber <int64>fee charged by platform
statusstringEnum: "NO_PAY" "INIT_ORDER" "OPEN_PAY_URL" "SUCCESS" "PAY_CANCEL" "PAY_ERROR"
order status. The value differs according to queryType.

when queryType is ORDER_QUERY, the status can be:
- INIT_ORDER: new order
- NO_PAY or OPEN_PAY_URL: paying
- SUCCESS: success
- PAY_CANCEL: canceld
- PAY_ERROR: failed to pay due to an error

when queryType is REFUND_QUERY, the status can be:
- 0 : newly created order
- 2 : refund successfully
- 4 : fail to refund

when queryType is CASH_QUERY, the status can be:
- 0 : newly created order
- 1 or 5 : platform is processing disbursement
- 2 : disburse successfully
- 3 : cancelled
- 4 : fail
msgstringdescription for status.
platSignstringEncrypted response data

Response Example#

{
"platRespCode": "SUCCESS",
"platRespMessage": "success",
"platOrderNum": "BCA_1234567890",
"orderNum": "T202007183457183",
"amount": 10000,
"fee": 3000,
"status": "NO_PAY",
"msg": "Unpaid",
"platSign": "MIGfMA0GCSqGSI...w1ypbiy7VhIoFJbgSYSSHdC"
}