被扫接口列表(代理商被扫接口)
需要授权
该接口提供商户收银系统或哆啦宝商户APP扫用户手机付款码进行支付时使用,
用户打开微信(支付宝)付款界面,商户收银系统或哆啦宝商户APP扫描用户付款二维码或条码进行收款。
POST请求参数:
请求地址:
环境 |
https请求地址 |
正式环境 |
https://openapi.duolabao.com/v1/agent/passive/create |
公共请求参数:
参数名称 |
参数类型 |
是否必填 |
最小长度 |
最大长度 |
参数说明 |
示例值 |
agentNum |
String |
是 |
|
32 |
代理商编号 |
10001114495558121971726 |
customerNum |
String |
是 |
|
32 |
商户编号 |
10001214513673242442196 |
authCode |
String |
是 |
|
32 |
用户付款码 |
212228325025 |
machineNum |
String |
否 |
|
32 |
机具编号 |
10011014593073262477203 |
shopNum |
String |
是 |
|
32 |
店铺编号 |
10001214653797401143127 |
requestNum |
String |
是 |
18 |
32 |
流水号(用户系统内唯一) |
建议时间戳+5位以上随机数(纯数字) |
amount |
String |
是 |
|
15, 2 |
支付金额 单位:元,精确到分 |
100.00 |
source |
String |
是 |
|
32 |
固定 |
API |
tableNum |
String |
否 |
|
11 |
桌号 |
15 |
请求示例:
-
1
|
{
|
2
|
"agentNum": "10001114495558121971726",
|
3
|
"customerNum": "10001214513673242442196",
|
4
|
"authCode":"212228325025",
|
5
|
"machineNum": "10011014593073262477203",
|
6
|
"shopNum": "10001214653797401143127",
|
7
|
"requestNum": "315080832507485",
|
8
|
"amount":"100.00",
|
9
|
"source":"API",
|
10
|
"tableNum":"15"
|
11
|
}
|
返回参数JSON格式:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
result |
String |
是 |
32 |
success表示成功,fail表示失败,error表示异常 |
success |
errorCode |
String |
否 |
32 |
详见错误码表 |
shopNumNotExist |
errorMsg |
String |
否 |
32 |
详见错误信息 |
shopNum not exist |
响应示例:
-
1
|
{
|
2
|
"data": {
|
3
|
"message":"pay proccessing,please check the order status.If the
payment is not successful,
|
|
please confirm the authCode or network reason."
|
4
|
},
|
5
|
"result": "success"
|
6
|
}
|
错误响应示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "shopNumNotExist",
|
4
|
"errorMsg":"shopNum not exist"
|
5
|
},
|
6
|
"result": "fail"
|
7
|
}
|
异常示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "systemError",
|
4
|
"errorMsg":"错误描述"
|
5
|
},
|
6
|
"result": "error"
|
7
|
}
|
错误码解释:
错误码 |
错误描述 |
解决方案 |
orderNotInit |
order not inited |
订单未被创建,请确认订单 |
payResultError |
pay return result info error |
支付返回有误 |
payRepeatRequest |
pay repeat request |
支付重复请求 |
paySystemError |
pay system error |
支付错误,请重新进行支付 |
machineNotExist |
machine not exist |
机具不存在,请确认机具号 |
shopNotExist |
shop not exist |
店铺不存在,请确认店铺 |
shopIsClosed |
shop is closed |
店铺已关闭,请确认店铺 |
customerNotExist |
customer not exist |
商户不存在请确认商户 |
customerInvalid |
customer invalid |
商户无效,请确认商户 |
shopInvalid |
shop invalid |
店铺无效,请确认店铺 |
amountInvalid |
amount invalid |
金额无效,请确认金额 |
sourceInvalid |
source invalid |
来源无效,请确定来源 |