Skip to content

Create PayIn · H2H ​

POST /v1/api/collection/create_deeplink_order

  • The successful data shape differs from H5: trade_no, out_trade_no, order_state, order_sum, pay_sum, and related fields.

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_nostringRequiredMerchant order ID, maximum 64 characters.
amountstring / numberRequiredOrder amount, minimum 0.01; a decimal string is recommended.
payer_namestringOptionalOptional payer name, maximum 128 characters.
notify_urlstringOptionalCallback URL, maximum 255 characters; URL/domain validation applies. No order callback is sent when omitted.
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_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"
}'

Response example ​

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"
  }
}

Fields in data ​

FieldTypeRequirementDescription
trade_nostringRequiredPlatform order ID; use as platform_order_no when querying.
out_trade_nostringRequiredMerchant order ID; use as tenant_order_no when querying.
order_stateintegerRequiredOrder status.
order_sumstringRequiredOriginal requested amount.
pay_sumstringRequiredCustomer payable amount; may differ. Not received funds.
currencystringRequiredCurrently INR; there is no currency request parameter.
payee_accountstringRequiredUPI payment identifier; may be empty.
default_open_urlstringRequiredDefault payment URL; may be empty.
standard_open_urlstringRequiredCommon payment URL; may be empty.
wallet_optionsarrayRequiredWallet payment options. Each entry contains wallet_code and open_url; the list may be empty.
wallet_options[].wallet_codestringRequiredWallet identifier: paytm (Paytm), phonepe (PhonePe), gpay (Google Pay).
wallet_options[].open_urlstringRequiredPayment URL for the wallet. Use the original URL returned in the response.
expire_atstringRequiredExpiration time.
created_atstringRequiredCreation time.

Error handling ​

See HTTP handling, request errors and error codes.

OpenAPI v1 · Merchant integration