Create PayIn · H5
POST /v1/api/collection/create_order
- payer_name is not a request parameter for this endpoint.
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 | Required | Your order ID, maximum 64 characters; not the platform order ID. |
amount | string / number | Required | Order amount, minimum 0.01; a decimal string is recommended. Per-order limits are merchant-specific. |
notify_url | string | Optional | Callback URL, maximum 255 characters; URL/domain validation applies. No order callback is sent when omitted. |
return_url | string | Optional | Browser return URL, maximum 255 characters. Not a webhook; actual redirect support depends on the payment flow. |
notify_remark | string | Optional | Maximum 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
| Field | Type | Requirement | Description |
|---|---|---|---|
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. |
payable_amount | string | Required | Amount the customer is instructed to pay; may differ from amount. Not received funds. |
status | integer | Required | Current order status; creation success is not payment success. |
payer_upi | string | Required | UPI payment identifier; may be empty. |
pay_url | string | Required | Payment-page URL. |
pay_time | string / null | Required | Payment time, normally null at creation. |
expire_time | string | Required | Payment-window expiration; not an irreversible failure cutoff. |
created_at | string | Required | Creation time. |
return_url | string | Required | Return URL; may be empty. |
meta | object | Required | paytm / upi / gpay / phonepe launch URLs; all may be empty. |
Error handling
See HTTP handling, request errors and error codes.