Create Payment Order
About 2 min
Create Payment Order
Tips
Used to generate payment data for USDT.TRC20
. Merchants can choose to redirect users to the Official Cashier
for payment or use the data for a Custom Cashier
. Upon successful payment by the user, the system will immediately perform a Callback Notification
.
Interface Address
POST https://api.tronpaid.com/api/v1/deposit/create
Interface Parameters
Parameter | Meaning | Validation | Type | Description |
---|---|---|---|---|
appid | Merchant app ID | Required | string(16) | Merchant app ID |
amount | Order amount | Required | string(16) | Precision up to two decimal places, currency unit: USDT |
notify_url | Callback notification address | Optional | string(256) | 1. After the user completes the payment, the system will send a post message to this address. 2. This parameter does not need to be urlencode . Example: http://www.xxx.com/pay_notify. 3. Merchants can also configure this parameter uniformly in the background, and it can be omitted after configuration |
redirect_url | Completion synchronous redirection address | Optional | string(256) | 1. After the user completes the payment, the system will automatically redirect to this address. 2. This parameter should not be urlencode . Example: https://www.xxx.com/pay_return |
order_id | Merchant order ID | Required | string(64) | System will include this parameter when notifying the merchant. Example: 201710192541 |
attach | Merchant custom data | Optional | string(64) | Merchant custom data, returned as-is during the callback |
product_name | Merchant-side product name | Optional | string(64) | This parameter will be displayed at the top of the official cashier page. Leave it blank to display the default value |
locale | Cashier multilingual | Optional | string(12) | This parameter specifies the cashier multilingualism, supporting: Chinese (zh-CN), English (en-US), default is Chinese |
sign | Signature string | Required | string(32) | Data signature |
Interface Response
Parameter | Meaning | Type | Description |
---|---|---|---|
trade_id | Official order ID | string(64) | Official order ID |
order_id | Merchant order ID | string(64) | Merchant order ID |
amount | Order amount | string(16) | Order amount, original data returned |
actual_amount | Order payment amount | string(16) | The actual amount that needs to be paid for the order |
token | Order collection address | string(64) | Wallet address configured by the merchant to receive user payments |
payment_url | Official cashier address | string(256) | Official cashier url address, merchants can directly redirect to this address for user payment |
notify_url | Callback notification address | string(256) | After the user completes the payment, the system will send a post message to this address |
redirect_url | Completion synchronous redirection address | string(256) | After the user completes the payment, the system will automatically redirect to this address |
expiration_time | Order expiration time | int | Order expiration time (Unix timestamp), unit: seconds |
product_name | Merchant-side product name | string(64) | This parameter will be displayed at the top of the official cashier page. Leave it blank to display the default value |
locale | Cashier multilingual | string(12) | Cashier multilingual, default is Chinese |
Response Example
{
"code": 200,
"message": "success",
"data": {
"trade_id": "202307091688832169091964",
"order_id": "1688832169",
"amount": "100",
"actual_amount": "100",
"token": "TYDiUX1GvAvyj4F6HLbVedg7FFXa4jUvAT",
"expiration_time": 1688832769,
"payment_url": "https://api.tronpaid.com/pay/check/202307091688832169091964",
"notify_url": "https://xxxx/transaction/create",
"redirect_url": "https://xxxx/transaction/create",
"product_name": "your product name",
"locale": "zh-CN"
},
"request_id": "8282f031-63a2-4229-b0a8-e2a5c1c84b29"
}