Skip to content

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 ​

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.
tenant_order_nostringEither IDMaximum 64 characters. Supply this or platform_order_no; if both are supplied, both must identify the same order.
platform_order_nostringEither IDPlatform 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 ​

FieldTypeRequirementDescription
tenant_idstringRequiredMerchant ID.
platform_order_nostringRequiredPlatform order ID.
tenant_order_nostringRequiredMerchant order ID.
amountstringRequiredOrder amount; does not prove payment success.
statusintegerRequiredOrder status; see the status reference.
pay_timestring / nullRequiredPayment confirmation time; may be null before success.
notify_urlstringRequiredConfigured callback URL; may be empty.
notify_statusintegerRequiredNotification status: 0 not notified, 1 in progress, 2 acknowledged, 3 failed. Independent of payment status.
created_atstringRequiredCreation time; preserve the received value.
payable_amountstringRequiredAmount payable by the customer.
paid_amountstringRequiredConfirmed paid amount; may be zero before confirmation.
expire_timestringRequiredOrder expiration time.
is_deeplink_orderbooleanRequiredWhether this is a H2H order.

Error handling ​

See HTTP handling, request errors and error codes.

OpenAPI v1 · Merchant integration