Skip to content

Create PayIn · H5 ​

POST /v1/api/collection/create_order

  • payer_name is not a request parameter for this endpoint.

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_nostringRequiredYour order ID, maximum 64 characters; not the platform order ID.
amountstring / numberRequiredOrder amount, minimum 0.01; a decimal string is recommended. Per-order limits are merchant-specific.
notify_urlstringOptionalCallback URL, maximum 255 characters; URL/domain validation applies. No order callback is sent when omitted.
return_urlstringOptionalBrowser return URL, maximum 255 characters. Not a webhook; actual redirect support depends on the payment flow.
notify_remarkstringOptionalMaximum 255 characters; echoed in the callback when non-empty.

For algorithm details, see signature rules.

Request example · cURL ​

bash
curl --request POST 'https://api.trpay2024.com/v1/api/collection/create_order' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "tenant_id": "DEMO0001",
  "app_key": "demo_app_key",
  "timestamp": "1791199800",
  "tenant_order_no": "DEMO-PAYIN-001",
  "amount": "500.00",
  "notify_url": "https://merchant.example/webhooks/payin",
  "return_url": "https://merchant.example/payment/result",
  "notify_remark": "demo-payin",
  "sign": "c235a5ba00a048c8a68cf1baa8e40343"
}'

Response example ​

json
{
  "request_id": "00000000-0000-4000-8000-000000000001",
  "path": "/v1/api/collection/create_order",
  "success": true,
  "code": 200,
  "message": "成功",
  "data": {
    "platform_order_no": "CRT202610051700DEMO0001",
    "tenant_order_no": "DEMO-PAYIN-001",
    "amount": "500.00",
    "payable_amount": "500.07",
    "status": 10,
    "payer_upi": "",
    "pay_time": null,
    "expire_time": "2026-10-05 17:30:00",
    "return_url": "https://merchant.example/payment/result",
    "created_at": "2026-10-05 17:00:00",
    "pay_url": "https://checkout.example/pay/demo",
    "meta": {
      "paytm": "",
      "upi": "",
      "gpay": "",
      "phonepe": ""
    }
  }
}

Fields in data ​

FieldTypeRequirementDescription
platform_order_nostringRequiredPlatform order ID.
tenant_order_nostringRequiredMerchant order ID.
amountstringRequiredOrder amount; does not prove payment success.
payable_amountstringRequiredAmount the customer is instructed to pay; may differ from amount. Not received funds.
statusintegerRequiredCurrent order status; creation success is not payment success.
payer_upistringRequiredUPI payment identifier; may be empty.
pay_urlstringRequiredPayment-page URL.
pay_timestring / nullRequiredPayment time, normally null at creation.
expire_timestringRequiredPayment-window expiration; not an irreversible failure cutoff.
created_atstringRequiredCreation time.
return_urlstringRequiredReturn URL; may be empty.
metaobjectRequiredpaytm / upi / gpay / phonepe launch URLs; all may be empty.

Error handling ​

See HTTP handling, request errors and error codes.

OpenAPI v1 · Merchant integration