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.

Difference between Create a payment order and Create a deposit order:

  • Create a payment order is used to charge a customer for a specific service or product. The order defines the amount to receive, and the payer can complete the payment in multiple transactions. Use this when you want to collect a specific payment from a customer.

  • Create a deposit order allows clients to deposit funds into their balance for a specific integration. The client chooses the amount to deposit, and the order is completed after the first transaction. Use this for topping up an account or balance, not for one-time payments.

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...