Skip to content

Create Payment Order

This interface is used to submit order information to the system and create a pending payment order.

Request Information

Request Path

POST /v1/payment

Headers

The request headers need to include authentication information and content type.

FieldTypeDescription
X-API-KeystringYour API Key, used to identify the caller.
X-TimestampstringThe timestamp of the current request (Unix epoch time, seconds).
X-NoncestringA random string (Nonce). Each request must use a unique Nonce.
X-SignaturestringThe signature of the request content.

Request Body

The request body is in JSON format and contains the detailed information of the order.

FieldTypeDescriptionRequiredExample Value
order_nostringMerchant's order number, globally unique, can only contain letters or numbers. Length should be between 8-32 characters.Yes"Pay1678886400"
currencystringOrder currency code, e.g., EUR, USD, USDT, etc.Yes"USDT "
amountstringOrder amount. Please use the string type to ensure precision.Yes"0.1"
chain_typestringPayment chain type. Currently only bsc is supported.Yes"bsc"
product_namestringProduct or service name, length should be within 32 characters.No"Test product name"
notify_urlstringAsynchronous notification callback address for payment results.Yes"http://your.domain/notify"
redirect_urlstringURL to redirect back to the merchant after payment is completed.No"http://your.domain/redirect"
metastringAdditional metadata. You can pass any custom information in this field.No"metadata"

Request Body Example (JSON):

json
{
  "order_no": "Pay1678886400000",
  "currency": "EUR",
  "amount": "0.1",
  "chain_type": "BSC",
  "product_name": "Test product name",
  "notify_url": "http://your.domain/notify",
  "redirect_url": "http://your.domain/redirect",
  "meta": "id:123"
}

Response Information

Successful Response Example (JSON)

When the request is successful (HTTP status code 200):

json
{
  "code": 10000,
  "message": "OK",
  "data": {
    "id": "5104887808",
    "order_no": "Pay1756198910",
    "currency": "EUR",
    "amount": "0.1",
    "order_amount": "0.12",
    "cancel_time": 1756200711,
    "state": 1,
    "pay_url": "https://zaepe.com/pay/377bcf79-c7af-438c-bd04-822254e218a7"
  }
}
FieldTypeDescription
idstringThe internal order ID in the payment system.
order_nostringThe merchant's order number, same as the order_no submitted in the request.
currencystringThe order currency code, same as the currency submitted in the request.
amountstringThe original order amount, same as the amount submitted in the request. Note that this is a string type.
order_amountstringThe actual amount to be collected in USDT. May differ from amount, e.g., after currency conversion. Note that this is a string type.
cancel_timeintThe order's cancellation/expiration time (Unix Timestamp, seconds). The order will be automatically closed or cannot be paid after this time.
stateintThe current status of the order. For specific values, please refer to Order Status.
pay_urlstringPayment page URL. The merchant should guide the user to this URL to complete the payment.

Error Response Example (JSON)

When the request fails (HTTP status code is not 200):

json
{
  "code": 10003,
  "message": "Invalid parameter `currency`: currency does not exist"
}