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 |
clientInfo | Object | N | Client information |
googlePayInfo | Object | N | GooglePay PaymentMethodTokenizationData.token view |
googlePayBillInfo | Object | N | GooglePay Address view |
applePayInfo | Object | N | ApplePay ApplePayPaymentToken view |
applePayBillInfo | Object | N | ApplePay ApplePayPaymentContact view |
applePayDecryptedRequestInfo | Object | N | Parameters decrypted by the merchant. This parameter is not mandatory if it is not decrypted by the merchant, but it's mandatory if it is decrypted by the merchant. Parameter example: { |
googlePayDecryptedRequestInfo | Object | N | Parameters decrypted by the merchant. This parameter is not mandatory if it is not decrypted by the merchant, but it's mandatory if it is decrypted by the merchant. PAN_ONLY example: { CRYPTOGRAM_3DS sample: { |
Request input parameters (quote)
Parameter | Type | Mandatory | Description |
---|---|---|---|
quoteId | Long | N | Quote id; if passed in, an order will be generated according to this quote. The quote needs to be valid; expired quotes cannot generate orders. The quote corresponding to the quote id needs to be consistent with cryptocurrencyCurrency\fiatAmount\fiatCurrency. If there is no quote id, it will be automatically generated when placing an order and an order will be created according to the quote at that time. |
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's 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. enum: GOOGLE_PAY 、APPLE_PAY 、CARD |
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 |
forterTokenCookie | String | N | Web Forter Token |
forterMobileUID | String | N | App Forter 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: In on-chain mode, pass the on-chain address; in off-chain mode, pass the userId |
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. |
Request input parameters (clientInfo)
Parameter | Type | Mandatory | Description |
---|---|---|---|
deviceId | String | N | Unique device identifier |
userAgent | String | N | Browser UA Information |
Lan | String | N | Browser Language |
browserVersion | String | N | Browser Version |
browserName | String | N | Browser Name |
agentOS | String | N | Operating System |
browserWidth | String | N | Browser Width |
browserHeight | String | N | Browser Height |
Note: clientInfo
is not a mandatory field, but the absence of this field may impact the success rate of orders. It is recommended that the merchant side transmits as much information as possible.
Output parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
orderId | String | Y | Order ID |