Skip to main content

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

ParameterMeaningValidationTypeDescription
appidMerchant app IDRequiredstring(16)Merchant app ID
amountOrder amountRequiredstring(16)Precision up to two decimal places, currency unit: USDT
notify_urlCallback notification addressOptionalstring(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_urlCompletion synchronous redirection addressOptionalstring(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_idMerchant order IDRequiredstring(64)System will include this parameter when notifying the merchant. Example: 201710192541
attachMerchant custom dataOptionalstring(64)Merchant custom data, returned as-is during the callback
product_nameMerchant-side product nameOptionalstring(64)This parameter will be displayed at the top of the official cashier page. Leave it blank to display the default value
localeCashier multilingualOptionalstring(12)This parameter specifies the cashier multilingualism, supporting: Chinese (zh-CN), English (en-US), default is Chinese
signSignature stringRequiredstring(32)Data signature

Interface Response

ParameterMeaningTypeDescription
trade_idOfficial order IDstring(64)Official order ID
order_idMerchant order IDstring(64)Merchant order ID
amountOrder amountstring(16)Order amount, original data returned
actual_amountOrder payment amountstring(16)The actual amount that needs to be paid for the order
tokenOrder collection addressstring(64)Wallet address configured by the merchant to receive user payments
payment_urlOfficial cashier addressstring(256)Official cashier url address, merchants can directly redirect to this address for user payment
notify_urlCallback notification addressstring(256)After the user completes the payment, the system will send a post message to this address
redirect_urlCompletion synchronous redirection addressstring(256)After the user completes the payment, the system will automatically redirect to this address
expiration_timeOrder expiration timeintOrder expiration time (Unix timestamp), unit: seconds
product_nameMerchant-side product namestring(64)This parameter will be displayed at the top of the official cashier page. Leave it blank to display the default value
localeCashier multilingualstring(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"
}
Last update:
Contributors: wesom