POST QuickPay/Pay
申请付款接口,收银员使用扫码设备读取用户手机“付款码”信息后,将“付款码”信息通过本接口发起支付,若返回结果如果是支付中(PAYING),请根据订单号调用【查询付款结果API】查询单据的最新状态,直到返回支付成功(SUCCESSED)或者支付失败(FAILED),若约定时间内查询结果还是支付中(PAYING),请调用【取消支付接口】取消这个单据。
请求信息
请求URI参数
无
请求数据参数
付款信息
PayInfo| 名称 | 说明 | 类型 | 扩展说明 |
|---|---|---|---|
| store_no |
门店编码. |
字符串 |
必填 字符长度: 必须在 1 和 32 之间 |
| operator |
操作员. |
字符串 |
必填 字符长度: 必须在 1 和 16 之间 |
| pos_pay |
是否调用POS机支付,如果调用POS机支付(true),则barcode传入POS机名称,默认为否(false) |
布尔 |
无 |
| barcode |
条码支付付款码/POS设备名称,当使用新大陆POS机进行交易时,如果一个门店对应多个设备时,barcode传入POS机名称,如果为空则默认取POS机列表中的第一个设备 |
字符串 |
必填 字符长度: 必须在 18 和 18 之间 |
| amount |
本次交易金额,以分为单位,不超过10位纯数字字符串 |
整数 |
必填 数值范围: 必须在 1 和 9999999999 之间 |
| order_no |
商户单据号,必须在此商户系统内唯一,推荐 机构号+门店号+订单编号 |
字符串 |
必填 字符长度: 必须在 1 和 32 之间 |
| iteminfo |
商品信息描述 |
字符串 |
无 |
| attach |
附加信息,在查询时会原样返回 |
字符串 |
字符长度: 必须在 0 和 127 之间 |
| goods_tag |
订单优惠标记,代金券或立减优惠功能的参数,配合代金券上订单优惠标记,可以控制订单是否适用指定的代金券 |
字符串 |
无 |
| device_no |
终端设备编号,可以为空 |
字符串 |
无 |
| share_pay |
是否分账支付 |
布尔 |
无 |
| itemlist |
商品清单列表,如果使用了单品优惠的代金券,必须传递此参数 |
Collection of ItemInfo |
无 |
请求数据格式
application/json, text/json
例子:
{
"store_no": "sample string 1",
"operator": "sample string 3",
"pos_pay": true,
"barcode": "sample string 5",
"amount": 6,
"order_no": "sample string 7",
"iteminfo": "sample string 8",
"attach": "sample string 9",
"goods_tag": "sample string 10",
"device_no": "sample string 11",
"share_pay": true,
"itemlist": [
{
"item_id": "sample string 1",
"item_no": "sample string 2",
"item_name": "sample string 3",
"quantity": 4,
"price": 5,
"promotion_type": 6
},
{
"item_id": "sample string 1",
"item_no": "sample string 2",
"item_name": "sample string 3",
"quantity": 4,
"price": 5,
"promotion_type": 6
}
]
}
响应数据
资源说明
付款结果
ResultInfoOfPayResultInfo| 名称 | 说明 | 类型 | 扩展说明 |
|---|---|---|---|
| code | ResultCode |
无 |
|
| msg | 字符串 |
无 |
|
| data | PayResultInfo |
无 |
响应数据格式
application/json, text/json
例子:
{
"code": "SUCCESS",
"msg": "sample string 1",
"data": {
"transaction_status": "CREATE",
"error": "sample string 1",
"store_no": "sample string 2",
"paytype": "WECHATPAY_NATIVE",
"operator": "sample string 3",
"bank_type": "sample string 4",
"total_amount": 5,
"cash_amount": 6,
"settlement_amount": 7,
"coupon_amount": 8,
"order_no": "sample string 9",
"transaction_no": "sample string 10",
"cloudpay_param": "sample string 11",
"transaction_time": "sample string 12",
"message": "sample string 13",
"buyer": "sample string 14",
"attach": "sample string 15",
"iteminfo": "sample string 16",
"coupon_detail_list": [
{
"coupon_id": "sample string 1",
"coupon_template": "sample string 2",
"coupon_name": "sample string 3",
"coupon_type": "sample string 4",
"memo": "sample string 5",
"amount": 6,
"amount_merchant": 7,
"amount_office": 8,
"amount_other": 9,
"amount_pay": 10
},
{
"coupon_id": "sample string 1",
"coupon_template": "sample string 2",
"coupon_name": "sample string 3",
"coupon_type": "sample string 4",
"memo": "sample string 5",
"amount": 6,
"amount_merchant": 7,
"amount_office": 8,
"amount_other": 9,
"amount_pay": 10
}
]
}
}