Create a payment order
POST/api/v1/order/payment
Create a new payment order. The payment order specifies the amount and currency you want to receive from the payer. On the payment page, the payer can choose to pay in a different currency, and the amount will be converted, so you will receive the amount you specified here.
The payer can pay the order in multiple transactions. The order status will be updated to completed
once 19 transaction confirmations are received from the network.
If the full amount is not paid within the order's lifetime, the order status will be marked as failed
.
The order is valid for 20 minutes. During this time, the payer must complete the payment.
Request
- application/json
Body
Details of the payment order to create.
Possible values: Value must match regular expression [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
The ID of the integration for which the payment order is created. Retrieve it from the Retrieve a list of integrations endpoint.
The amount to be paid by the client. Use a decimal point as a separator, up to 6 decimal places. If more than 6 decimal places are provided, the value will be rounded.
Possible values: [TRX
, USDT_TRC20
]
The ID of the asset for payment.
Responses
- 200
Payment order created successfully.
- application/json
- Schema
- Example (from schema)
Schema
The unique identifier of the created order.
The URL to the payment page where the client needs to be redirected to complete the payment.
The HTML code for embedding the payment widget on your site.
{
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"paymentLink": "https://example.com/payment/123e4567-e89b-12d3-a456-426614174000",
"widgetCode": "<iframe src=https://example.com/iframe?integrationId=1ef4e7cd-0b48-657a-ab8c-65ac066ea2c5&orderId=1ef61435-1606-6f76-bd9d-2fc7624dd369 width=\"100%\" height=\"800px\"></iframe>"
}