Create pay-in order (own checkout)
For merchants with their own payment page. The platform returns the receiving accounts assigned to the order, and you show them to the customer. Then:
- the customer says they've paid → call Mark as paid;
- the customer gives up → call Cancel order.
When the money arrives you get the usual callback.
/api/open/order/createBuyOrder2Full URL = your API base URL + this path. The base URL is shown in the merchant console under Developers → API & callbacks.
Request parameters
Same as Create pay-in order (hosted checkout) (redirectUrl and hideUsdt are not used).
With paymentType 101 / 102 / 103 the order is a crypto deposit: the response is the same as Create crypto deposit (payAddress, payAmount, …). No receiving account is assigned and you don't call Mark as paid: the platform handles the on-chain payment automatically.
Response
| Field | Type | Description |
|---|---|---|
order.orderNo | string | Platform order number |
order.merchantOrderNo | string | Your order number |
order.totalAmount | number | Fiat amount |
order.usdt | number | USDT amount (before fees) |
order.currency | string | Currency code |
order.orderTime | string | Order time |
cards[] | array | Receiving accounts for this order; the customer pays to one of them. There may be several, and they may belong to different payees — see Showing the accounts |
cards[].cardId | int | Account ID, needed for Mark as paid |
cards[].paymentType | int | Payment method code |
cards[].realName | string | Holder name of this account (each account has its own; they may differ) |
cards[].bankName | string | Bank name |
cards[].bankBranch | string | Bank branch |
cards[].cardNo | string | Bank card / account number |
cards[].payAccount | string | Payee account: Alipay / WeChat account, or e-wallet account (MoMo, TrueMoney, PIX, …; card number is empty for these) |
cards[].payQrCode | string | QR code image or payment link (some methods only, may be empty; when empty, show realName + payAccount so the customer can transfer to the account) |
{
"code": 0,
"message": "success",
"data": {
"order": {
"orderTime": "2026-10-13 12:00:00",
"orderNo": "PI1845290017342758912",
"totalAmount": 100,
"usdt": 13.7,
"merchantOrderNo": "A20261013001",
"currency": "CNY"
},
"cards": [
{ "cardId": 1024, "paymentType": 1, "payQrCode": "", "payAccount": "", "realName": "Li Si", "bankName": "ICBC", "bankBranch": "Beijing Haidian", "cardNo": "6222000000000000" },
{ "cardId": 2048, "paymentType": 3, "payQrCode": "", "payAccount": "wangwu@example.com", "realName": "王五", "bankName": "", "bankBranch": "", "cardNo": "" }
]
}
}WARNING
Show the receiving accounts only to this order's customer. Remind them to pay from their own account in the customerName given at order creation, and to pay exactly the order amount.
Showing the accounts
When paymentType is not set, the platform tries to offer every payment method available for the amount (for example bank card, Alipay and WeChat). These accounts may belong to different payees. Please:
- show every account in
cards, each with its ownrealNameas the payee — do not treat the first account's payee as the payee of the whole order; - expect more than one account for the same method (same
paymentType); show them all or let the customer pick one; - not cache or reuse accounts from earlier orders — every order may get different accounts;
- after the customer pays, call Mark as paid with the
cardIdof the account the customer actually transferred to.
Orders with paymentType set only return accounts of that method.
Rates can differ slightly between payees, so the USDT actually credited may differ slightly from the usdt returned here; the callback and Get order are authoritative.
Common errors
Same as for the hosted checkout; in addition, a payment provider failure returns 400.