Submit order
Interface address: /api/v1/order/create-order
Notes: Use to create orders
Request input parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
merchantOrder | String | Y | Merchant order's unique tag |
type | String | Y | 0: Create a new order (by default). 1: Resubmit a new order. "merchantOrder" must be consistent. Nothing can be updated except for "quoteId". |
userId | String | Y | User's unique tag |
businessType | String | Y | Business type: BUY/SELL |
clientIp | String | Y | Client IP address |
merchantUserLevel | String | N | Merchant user level 0 – 4 |
quote | Object | Y | Quote information |
card | Object | Y | Card information |
payment | Object | Y | Payment information |
withdraw | Object | Y | Withdrawal information |
Request input parameters (quote)
Parameter | Type | Mandatory | Description |
---|---|---|---|
quoteId | Long | N | Quote ID. When entered, an order will be created based on this quote, which must be still valid. Orders cannot be created with expired quotes. The quote ID must be consistent with the parameters of crypto, amount, and fiatCurrency. If there is no Quote ID, one will be generated at the time the order is created based on the quote. |
cryptoCurrency | String | N | Cryptocurrency to buy |
fiatCurrency | String | N | Fiat currency to be paid |
fiatAmount | String | N | Fiat amount to be paid by the user |
Request input parameters (card)
Parameter | Type | Mandatory | Description |
---|---|---|---|
cardId | String | Y | Card ID to be used by the user. Only allowed to enter when the payment method is a card. Verify that the card ID matches the user ID. |
fullName | String | N | Cardholder name |
country | String | N | Country/region |
address | String | N | Billing address |
city | String | N | City |
postalCode | String | N | Postal code |
phone | String | N | Phone number |
areaCode | String | N | Country code of the phone number |
Request input parameters (payment)
Parameter | Type | Mandatory | Description |
---|---|---|---|
payWayCode | String | Y | Payment method to be used by the user |
redirectUrl | String | Y | Users will be redirected to this address after payment. When using API, this parameter is passed through to "checkout". |
failUrl | String | Y | Users will be redirected to this address if payment failed. When using API, this parameter is passed through to "checkout". |
callbackUrl | String | Y | Push address for the order's webhook. |
deviceSessionId | String | Y | View generation method |
forterToken | String | N | Forter token |
cybsToken | String | N | Cybs token |
Request input parameters (withdraw)
Parameter | Type | Mandatory | Description |
---|---|---|---|
network | String | N | The network associated with the cryptocurrency. Merchant type: "network" is mandatory for on-chain mode and optional for off-chain mode. |
transferAddress | String | N | Merchant type: Provide the receiver's on-chain address in on-chain mode. |
transferMode | String | N | CHAIN: on-chain |
merchantUser | String | N | User's unique ID on the merchant end. Merchant type: "merchantUser" is mandatory for off-chain mode. |
Output parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
orderId | String | Y | Order ID |