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.
Field | Type | Description |
---|---|---|
X-API-Key | string | Your API Key, used to identify the caller. |
X-Timestamp | string | The timestamp of the current request (Unix epoch time, seconds). |
X-Nonce | string | A random string (Nonce). Each request must use a unique Nonce. |
X-Signature | string | The signature of the request content. |
Request Body
The request body is in JSON format and contains the detailed information of the order.
Field | Type | Description | Required | Example Value |
---|---|---|---|---|
order_no | string | Merchant's order number, globally unique, can only contain letters or numbers. Length should be between 8-32 characters. | Yes | "Pay1678886400" |
currency | string | Order currency code, e.g., EUR , USD , USDT , etc. | Yes | "USDT " |
amount | string | Order amount. Please use the string type to ensure precision. | Yes | "0.1" |
chain_type | string | Payment chain type. Currently only bsc is supported. | Yes | "bsc" |
product_name | string | Product or service name, length should be within 32 characters. | No | "Test product name" |
notify_url | string | Asynchronous notification callback address for payment results. | Yes | "http://your.domain/notify" |
redirect_url | string | URL to redirect back to the merchant after payment is completed. | No | "http://your.domain/redirect" |
meta | string | Additional 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"
}
}
Field | Type | Description |
---|---|---|
id | string | The internal order ID in the payment system. |
order_no | string | The merchant's order number, same as the order_no submitted in the request. |
currency | string | The order currency code, same as the currency submitted in the request. |
amount | string | The original order amount, same as the amount submitted in the request. Note that this is a string type. |
order_amount | string | The actual amount to be collected in USDT. May differ from amount , e.g., after currency conversion. Note that this is a string type. |
cancel_time | int | The order's cancellation/expiration time (Unix Timestamp, seconds). The order will be automatically closed or cannot be paid after this time. |
state | int | The current status of the order. For specific values, please refer to Order Status. |
pay_url | string | Payment 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"
}