Query UTR
POST /v1/api/collection/query_utr
- Successful responses use a separate shape. body.errorCode="0" means a match exists; "1001" means not found. A UTR match alone does not prove order success.
- Only the first matched order is returned; this is not a full order-list response.
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. |
utr | string | Required | Payment reference, maximum 64 characters. Searches this merchant’s related orders only. |
For algorithm details, see signature rules.
Request example · cURL
bash
curl --request POST 'https://api.trpay2024.com/v1/api/collection/query_utr' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenant_id": "DEMO0001",
"app_key": "demo_app_key",
"timestamp": "1791199800",
"utr": "123456789012",
"sign": "6be8d4b6a9378d79c58ec7906069b029"
}'Response example
json
{
"status": "200",
"timestamp": "2026-10-05 17:00:00",
"message": "成功",
"body": {
"mcOrderNum": "DEMO-PAYIN-001",
"platformOrderNum": "CRT202610051700DEMO0001",
"amount": 500,
"errorCode": "0",
"errorMsg": ""
}
}Response fields
| Field | Type | Requirement | Description |
|---|---|---|---|
status | string | Required | Outer "200" means the query request succeeded. |
timestamp | string | Required | Query time. |
message | string | Required | Description. |
body.mcOrderNum | string | Required | Matched merchant order ID. |
body.platformOrderNum | string | Required | Matched platform order ID. |
body.amount | number | Required | Order amount, not net settlement. |
body.errorCode | string | Required | "0" matched; "1001" not found. |
body.errorMsg | string | Required | Match-result description. |
Error handling
See HTTP handling, request errors and error codes.