Skip to content

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 ​

FieldTypeRequirementDescription
tenant_idstringRequiredMerchant ID; must belong to the same merchant as app_key. Maximum 20 characters.
app_keystringRequiredApplication key, maximum 16 characters; sign using the secret of this exact application.
timestampstring / integerRequiredCurrent Unix timestamp in seconds. Timestamps older than 60 seconds are rejected; do not send milliseconds.
signstringRequired32-character lowercase MD5 calculated using the signature rules.
utrstringRequiredPayment 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 ​

FieldTypeRequirementDescription
statusstringRequiredOuter "200" means the query request succeeded.
timestampstringRequiredQuery time.
messagestringRequiredDescription.
body.mcOrderNumstringRequiredMatched merchant order ID.
body.platformOrderNumstringRequiredMatched platform order ID.
body.amountnumberRequiredOrder amount, not net settlement.
body.errorCodestringRequired"0" matched; "1001" not found.
body.errorMsgstringRequiredMatch-result description.

Error handling ​

See HTTP handling, request errors and error codes.

OpenAPI v1 · Merchant integration