Skip to main content

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

Body

Details of the payment order to create.

    integrationId stringrequired

    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.

    amount stringrequired

    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.

    assetId stringrequired

    Possible values: [TRX, USDT_TRC20]

    The ID of the asset for payment.

Responses

Payment order created successfully.

Schema
    orderId stringrequired

    The unique identifier of the created order.

    paymentLink stringrequired

    The URL to the payment page where the client needs to be redirected to complete the payment.

    widgetCode stringrequired

    The HTML code for embedding the payment widget on your site.

Loading...