Create pay-in order (hosted checkout)
Creates a pay-in order and returns the platform checkout URL. Send the customer there to pay to the account shown on the page. When the money arrives, the platform sends you a callback.
POST
/api/open/order/createBuyOrderFull URL = your API base URL + this path. The base URL is shown in the merchant console under Developers → API & callbacks.
Requires: whitelisted IP, OpenAPI enabled, a pay-in callback URL (or callbackUrl on this order).
Request parameters
JSON before encryption:
| Parameter | Type | Required | Description |
|---|---|---|---|
merchantNo | string | Yes | Merchant number, same as the outer one |
merchantOrderNo | string | Strongly recommended | Your order number, unique per merchant (40007). If omitted the platform generates a random one and you won't be able to query by it |
amount | number | Yes | Fiat amount, greater than 0, at most two decimals |
currencyType | string | Yes | Currency code such as CNY, THB, VND; must be enabled for your account |
customerName | string | Yes | Payer's real name. The customer must pay from an account in this name; also used for blacklist checks |
customerIdCardNumber | string | No | Payer's ID number (used for blacklist checks) |
customerPhoneNumber | string | No | Payer's phone number |
customerCountry | string | No | Payer's nationality |
paymentType | int | No | Restrict the order to one payment method. CNY: 1 bank card, 2 WeChat, 3 Alipay; other currencies use codes from List payout methods |
redirectUrl | string | No | Where the checkout sends the customer after paying |
hideUsdt | bool | No | Hide the USDT amount on the checkout page |
callbackUrl | string | No | Callback URL for this order; defaults to the pay-in callback URL in the console |
json
{
"merchantNo": "your merchant number",
"merchantOrderNo": "A20261013001",
"amount": 100,
"currencyType": "CNY",
"customerName": "Zhang San",
"redirectUrl": "https://shop.example.com/pay/done"
}Response
| Field | Type | Description |
|---|---|---|
url | string | Checkout URL to send the customer to |
json
{
"code": 0,
"message": "success",
"data": { "url": "https://checkout-domain/#/step1?orderId=…&checkoutToken=…&hideUsdt=&redirectUrl=…" }
}The checkout URL contains an access token for this order. Give it only to this customer; never publish it.
Common errors
40004, 40005, 40007, 40010, 40011, 40012, 40013, 40015, 40016, 40017, 40019 — see Error codes.
Order states
| orderState | Meaning |
|---|---|
| 1 | Pending payment |
| 2 | To be released (customer has paid; waiting for the trader to confirm receipt) |
| 6 | Released (platform confirmed the money, USDT credited to your balance; you get a callback) |
| 3 | Success (you replied success to the callback) |
| 4 | Cancelled |
| 5 | Expired (the customer didn't pay in time) |
| 7 | Reversed |
Get order always returns the current state.