创建代收 · Deeplink
POST /v1/api/collection/create_deeplink_order
- Deeplink 成功体的字段与 H5 不同:trade_no、out_trade_no、order_state、order_sum、pay_sum 等。
请求参数
| 字段 | 类型 | 要求 | 说明 |
|---|---|---|---|
tenant_id | string | 必填 | 商户编号,须与 app_key 属于同一商户;最多 20 字符。 |
app_key | string | 必填 | 商户应用标识,最多 16 字符;使用该应用对应的 app_secret 签名。 |
timestamp | string / integer | 必填 | 当前 Unix 秒级时间戳。超过 60 秒的旧时间戳会被拒绝;不要传毫秒。 |
sign | string | 必填 | 按签名规则计算的 32 位小写 MD5。 |
tenant_order_no | string | 必填 | 商户订单号,最多 64 字符。 |
amount | string / number | 必填 | 订单金额,最小 0.01;建议传十进制字符串。 |
payer_name | string | 选填 | 付款人姓名,选填,最多 128 字符。 |
notify_url | string | 选填 | 结果回调地址,最多 255 字符,须通过 URL/域名校验。不传则没有该订单回调。 |
notify_remark | string | 选填 | 最多 255 字符,非空时在回调中原样返回。 |
签名计算见签名规则。
请求示例 · cURL
bash
curl --request POST 'https://api.trpay2024.com/v1/api/collection/create_deeplink_order' \
--header 'Content-Type: application/json' \
--data-raw '{
"tenant_id": "DEMO0001",
"app_key": "demo_app_key",
"timestamp": "1791199800",
"tenant_order_no": "DEMO-H2H-001",
"amount": "500.00",
"payer_name": "Demo Customer",
"notify_url": "https://merchant.example/webhooks/payin",
"notify_remark": "demo-h2h",
"sign": "9f274279197c7447ae44bfdc1b061b62"
}'响应示例
json
{
"request_id": "00000000-0000-4000-8000-000000000001",
"path": "/v1/api/collection/create_deeplink_order",
"success": true,
"code": 200,
"message": "成功",
"data": {
"trade_no": "CRT202610051700DEMO0002",
"out_trade_no": "DEMO-H2H-001",
"order_state": 10,
"order_sum": "500.00",
"pay_sum": "500.07",
"currency": "INR",
"payee_account": "demo@upi",
"default_open_url": "https://checkout.example/pay/demo",
"standard_open_url": "",
"wallet_options": [
{
"wallet_code": "paytm",
"open_url": "https://checkout.example/pay/demo?wallet=paytm"
},
{
"wallet_code": "phonepe",
"open_url": "https://checkout.example/pay/demo?wallet=phonepe"
},
{
"wallet_code": "gpay",
"open_url": "https://checkout.example/pay/demo?wallet=gpay"
}
],
"expire_at": "2026-10-05 17:30:00",
"created_at": "2026-10-05 17:00:00"
}
}data 字段
| 字段 | 类型 | 要求 | 说明 |
|---|---|---|---|
trade_no | string | 必填 | 平台订单号;查单时作为 platform_order_no。 |
out_trade_no | string | 必填 | 商户订单号;查单时作为 tenant_order_no。 |
order_state | integer | 必填 | 订单状态。 |
order_sum | string | 必填 | 创建时提交的订单金额。 |
pay_sum | string | 必填 | 客户应付金额,可能不同;不是实收金额。 |
currency | string | 必填 | 当前为 INR;没有 currency 请求参数。 |
payee_account | string | 必填 | 付款所需 UPI,可能为空。 |
default_open_url | string | 必填 | 默认支付链接,可能为空。 |
standard_open_url | string | 必填 | 通用支付链接,可能为空。 |
wallet_options | array | 必填 | 钱包支付选项列表,每项包含 wallet_code 和 open_url;列表可为空。 |
wallet_options[].wallet_code | string | 必填 | 钱包标识:paytm(Paytm)、phonepe(PhonePe)、gpay(Google Pay)。 |
wallet_options[].open_url | string | 必填 | 对应钱包的支付链接,请使用响应返回的原始链接。 |
expire_at | string | 必填 | 过期时间。 |
created_at | string | 必填 | 创建时间。 |