# Query Order

Merchants query orders through this API, and the payment gateway will return the latest order data.

# Query Order API

api

Request API: /api/pay/query

Request method: POST

Request type: application/json or application/x-www-form-urlencoded

# Request parameters

Field Name Variable Name Required Type Example Value Description
Merchant No mchNo Yes String(30) M1621873433953 Merchant Number
App ID appId Yes String(24) 60cc09bce4b0f1c0b83761c9 App ID
Payment Order No payOrderId Yes String(30) P20160427210604000490 The order number generated by the payment center can be passed along with mchOrderNo
Merchant Order No mchOrderNo Yes String(30) 20160427210604000490 The order number generated by the merchant can be passed along with payOrderId
Request time reqTime Yes long 1622016572190 Request API time, 13-digit timestamp
API version version Yes String(3) 1.0 API version number, fixed: 1.0
Signature sign Yes String(32) C380BEC2BFD727A4B6845133519F3AD6 Signature value, see signature algorithm for details
Signature type signType Yes String(32) MD5 Signature type, currently only supports MD5 mode

# Request Example Data

{
    "payOrderId": "P202106181104177050002",
    "appId": "60cc09bce4b0f1c0b83761c9",
    "sign": "46940C58B2F3AE426B77A297ABF4D31E",
    "signType": "MD5",
    "reqTime": "162201672190",
    "mchNo": "M1623984572",
    "version": "1.0"
}

# Return parameters

Field Name Variable Name Required Type Example Value Description
Return status code Yes int 0 0 - processing successful, others - processing error, see error code for details
Return information msg No String(128) Signature failure Specific error reasons, such as: signature failure, parameter format verification error
Signature information sign No String(32) CCD9083A6DAD9A2DA9F668C3D4517A84 Sign the data in data, if data is empty, it will not be returned
Return data data No String(512) {} Return order data, json format data

# Parameter Data Format

Field Name Variable Name Required Type Example Value Description
Payment Order No payOrderId Yes String(30) P12021022311124442600 Return payment system order number
Merchant No mchNo Yes String(30) M1621873433953 Merchant Number
App ID appId Yes String(24) 60cc09bce4b0f1c0b83761c9 App ID
Merchant Order No mchOrderNo Yes String(30) 20160427210604000490 Return the order number passed in by the merchant
Payment Method wayCode Yes String(30) PIX Payment method
CHECKOUT: The user has not selected a payment method
Payment amount amount Yes String(long) 100 Payment amount, in cents
Currency code currency Yes String(3) USD Three-digit currency code
Order status state Yes int 2 Payment order status
0-Order generated
1-Payment in progress
2-Payment successful
3-Payment failed
4-Cancelled
6-Order closed
Client IP clientIp No String(32) 210.73.10.148 Client IPV4 address
Product title subject Yes String(64) Product title test Product title
Product Description body Yes String(256) product description test product description
Channel error description errMsg No String Business exception error Channel order return error description
Extended parameters extParam No String(512) 134586944573118714 Merchant extended parameters, which will be returned unchanged during callback
Creation time createdAt Yes String(long) 1622016572190 Order creation time, 13-digit timestamp
Success time successTime No String(long) 1622016572190 Order payment success time, 13-digit timestamp

# Return Example Data

{
    "code": 0,
    "data": {
        "amount": "58",
        "appId": "60cc09bce4b0f1c0b83761c9",
        "body": "Product description",
        "clientIp": "192.166.1.132",
        "createdAt": "1623985457705",
        "currency": "BRL",
        "extParam": "",
        "mchNo": "M1623984572",
        "mchOrderNo": "mho1623985457320",
        "payOrderId": "P202106181104177050002",
        "state": 2,
        "subject": "Product title",
        "successTime": "1623985459000",
        "wayCode": "PIX"
    },
    "msg": "SUCCESS",
    "sign": "9548145EA12D0CD8C1628BCF44E19E0D"
}

Last Updated: 1/10/2026, 2:27:17 PM