Checkout
Checkout
After the merchant calls the Order Creation
interface, the returned data will be in the following format:
{
"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",
"customer_id": "merid",
"product_name": "your product name",
"locale": "zh-CN"
},
"request_id": "8282f031-63a2-4229-b0a8-e2a5c1c84b29"
}
Merchants can directly extract the payment_url
field from the above returned data and then redirect to this address for user payment.
Cashier
After redirecting to payment_url
, the page displays as follows:
Redirection
After a successful payment by the user at the cashier, the system will automatically notify the merchant at the callback address (notify_url
) specified when creating the order. After an interval of approximately 1
second, the page will automatically redirect to the merchant's specified redirection address (redirect_url
) when creating the order.
Tips
If the merchant does not specify notify_url
when creating the order, the system will use the Order Callback Address
configured uniformly in the background by the merchant.
Redirect Address
GET redirect_url (Specified by the merchant in the order creation interface)
Redirect Parameters
Parameter | Meaning | Type | Description |
---|---|---|---|
order_id | Merchant's custom order number | string(32) | Merchants can use the order_id parameter to query the local database, confirm whether the user has paid successfully, and provide corresponding page display. |
Warning
Please do not consider this redirection as a condition for judging the success of user payment; this behavior is extremely insecure. Please judge whether the user has paid successfully based on whether the callback notification for successful payment has been received.