5. 创建订单
- 接口路径:/v1/order/create-order
- 请求方式:POST
- Request
| 字段名称 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| fiatCurrency | String | Y | 法币币种 |
| cryptoCurrency | String | Y | 加密币种 |
| baseCurrency | String | N | 基础币种 |
| fiatAmt | String | N | 法币金额 (BUY/BUY_TO_WALLET 必传) |
| cryptoAmt | String | N | 加密币种金额 (SELL 必传) |
| paymentMethod | String | N | 支付方式,请参见枚举类型定义。当paymentMethod为空或者ALL时,会展示收银台页面提示用户选择可用的支付方式。当paymentMethod不为空时,会展示支付方式对应的交易页面 |
| side | String | Y | 交易类型,请参见枚举类型定义 |
| merchantUserId | String | Y | 商户平台用户唯一标识 |
| merchantOrderNo | String | N | 商户平台订单唯一标识 |
| walletNetwork | String | N | 用户钱包网络, BUY_TO_WALLET/BANK_TRANSFER场景需要 |
| walletAddress | String | N | 用户钱包地址, BUY_TO_WALLET/BANK_TRANSFER场景需要 |
| walletMemo | String | N | 用户钱包Memo |
| clientType | String | Y | 客户端类型,请参见枚举类型定义 |
| clientIp | String | N | 客户端IP |
| clientLang | String | N | 客户端语言(两位国家码) |
| clientMode | String | N | 客户端UI模式 |
| redirectUrl | String | Y | 订单完成后跳转回的商户地址 |
| merchantRemark | String | N | 商户备注,最大长度64) |
- Response
| 字段名称 | 类型 | 描述 |
|---|---|---|
| orderId | String | Paymonade系统订单唯一标识 |
| tranId | String | 订单凭证ID,与orderId 对应 |
| checkoutUrl | String | Paymonade交易页面 |
注意:
当支付方式为BANK_TRANSFER类型时,接口返回的参数orderId无实际参考意义。Response Example:
{
"status": 200,
"msg": "OK",
"data": {
"orderId": "buy202218839330",
"checkoutUrl": "https://13.39.202.125/login?tranId=61374548144164864&tranType=buy&cTag=0&redirectUrl=https://www.merchant.com/order/result/3454354343535"
},
"traceId": "77ec4eeb-86ea-42e3-97f2-e5ff1c81e7fc"
}