Query PayIn
POST /v1/api/collection/query_order
- Code 203006 means no returnable order was found for this query; it is not a payment status.
Request fields
| Field | Type | Requirement | Description |
|---|---|---|---|
tenant_id | string | Required | Merchant ID; must belong to the same merchant as app_key. Maximum 20 characters. |
app_key | string | Required | Application key, maximum 16 characters; sign using the secret of this exact application. |
timestamp | string / integer | Required | Current Unix timestamp in seconds. Timestamps older than 60 seconds are rejected; do not send milliseconds. |
sign | string | Required | 32-character lowercase MD5 calculated using the signature rules. |
tenant_order_no | string | Either ID | Maximum 64 characters. Supply this or platform_order_no; if both are supplied, both must identify the same order. |
platform_order_no | string | Either ID | Platform order ID, maximum 32 characters. |
For algorithm details, see signature rules.
Request example · cURL
bash
curl --request POST 'https://api.trpay2024.com/v1/api/collection/query_order' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenant_id": "DEMO0001",
"app_key": "demo_app_key",
"timestamp": "1791199800",
"tenant_order_no": "DEMO-PAYIN-001",
"sign": "ca80e3fd36fa30677236bf744064b99c"
}'Response example
json
{
"request_id": "00000000-0000-4000-8000-000000000001",
"path": "/v1/api/collection/query_order",
"success": true,
"code": 200,
"message": "成功",
"data": {
"tenant_id": "DEMO0001",
"tenant_order_no": "DEMO-PAYIN-001",
"platform_order_no": "CRT202610051700DEMO0001",
"amount": "500.00",
"payable_amount": "500.07",
"paid_amount": "500.07",
"status": 20,
"pay_time": "2026-10-05 17:02:00",
"expire_time": "2026-10-05 17:30:00",
"notify_url": "https://merchant.example/webhooks/payin",
"notify_status": 2,
"created_at": "2026-10-05 17:00:00",
"is_deeplink_order": false
}
}Fields in data
| Field | Type | Requirement | Description |
|---|---|---|---|
tenant_id | string | Required | Merchant ID. |
platform_order_no | string | Required | Platform order ID. |
tenant_order_no | string | Required | Merchant order ID. |
amount | string | Required | Order amount; does not prove payment success. |
status | integer | Required | Order status; see the status reference. |
pay_time | string / null | Required | Payment confirmation time; may be null before success. |
notify_url | string | Required | Configured callback URL; may be empty. |
notify_status | integer | Required | Notification status: 0 not notified, 1 in progress, 2 acknowledged, 3 failed. Independent of payment status. |
created_at | string | Required | Creation time; preserve the received value. |
payable_amount | string | Required | Amount payable by the customer. |
paid_amount | string | Required | Confirmed paid amount; may be zero before confirmation. |
expire_time | string | Required | Order expiration time. |
is_deeplink_order | boolean | Required | Whether this is a H2H order. |
Error handling
See HTTP handling, request errors and error codes.