# 1. 创建订单

# 简要描述

  • 当商户确认支付完成后,向SwiMove发送创建订单请求,SwiMove会为商户创建订单,并向已连接的打印机推送打印支付小票的指令。

# HTTP请求信息

# 请求URL

  • {domain}/open-api/order/jt/create

# 请求方式

  • POST

# 请求头

参数名 是否必填 类型 说明
Content-Type string application/json

# 请求体参数

参数名 是否必填 类型 长度 示例 说明
appId string - 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 应用 id (SwiMove 提供)
storeKey string 100 CVIEIYUNHTS0 店铺标识 (SwiMove 提供)
param string - - 请求参数字符串
sign string - param 的RSA签名

# Param 参数

参数名 是否必填 类型 长度 示例 说明
paymentWay string - 1 支付方式 1:线上 2:线下 (线上方式暂不支持)
paymentChannel string 1 - 200 QRPH_DYNAMIC_QR 支付渠道(线上交易必填)Payment channel list
paymentTransactionId string 1 - 50 支付交易id (PayCools系统 merchantOrderId号 线上交易必填)
paymentAmount integer 1 - 100000000 100 支付金额(实付金额)单位分
discountAmount integer 1 - 100000000 10 折扣金额 单位分
productInfo List 1 - 50 - 商品明细
awb string 1 - 50 发件人 AWB
name string 1 - 50 发件人名称
mobile string 1 - 14 发件人手机号
address string 1 - 200 发件人地址
tin string 14 12345678901212 税号(tin必须仅包含数字)
cashierAccountName string 100 12345678901212 收银员账号名称
cashierAccountCode string 30 12345678901212 收银员账号编码

# Product Info 参数

参数名 是否必填 类型 长度 示例 说明
productName string 1 - 50 coffee 商品名称
price integer 0 - 1000000 100 商品税后单价 单位:分
quantity integer 1 - 1000 1 商品数量

# 请求体示例

{
  "appId": "45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892",
  "storeKey": "CVIEIYUNHTS0",
  "sign": "abcdef",
  "param": "{\"productInfo\": [{\"productName\": \"item\",\"price\": 100,\"quantity\": 1}],\"customPrintContext\": \"test custom\",\"paymentWay\": 1,\"paymentTransaction\": \"ON12384876123\",\"paymentAmount\": 100,\"discountAmount\": 10, \"discountType\": 1,\"AWB\": \"12384876123132\",\"name\": \"Kim\",\"mobile\": \"0912345678\",\"address\": \"test Address\",\"tin\":\"12345678901212\",\"cashierAccountName\":\"12345678901212\",\"cashierAccountCode\":\"12345678901212\"}"
}

# 响应示例

# 状态码 Refer to this list

# 响应参数

参数名 类型 示 例 说明
code integer 10000 状态码 Refer to List
message string success 状态码说明
data string - 返回的参数

# Data 参数

Parameter Name Type Example Description
orderNo string TB0000001 订单号
orderSi string 000000001 订单打印小票si
{
  "code": 10000,
  "message": "success",
  "data": "{\"orderNo\":\"TB*******431\",\"orderSi\":\"00000001\"}"
}

# 失败响应示例

{
    "code":21000,
    "message":"Service error, please contact administrator",
    "data":null
}

# 支付渠道

渠道名称 渠道 code
QRPH QRPH_DYNAMIC_QR
GCash WebPay GCASH_URL
Grab WebPay GRPY_URL
UnionBank UBPB_URL
BPI BPIA_URL
Maya PAYMAYA_URL
ShopeePay SHOPEE_URL
UnionBank UBPB_URL
WechatPay WECHAT_URL
Alipay ZFB_URL
GCash QR GCASH_DYNAMIC_QR
GCash Scan QR GCASH_CPM