代理商接口列表 (关闭订单)
需要授权
代理商订单支付失败需要生成新单号重新发起支付,要对原订单号调用关单,避免重复支付;系统下单后, 用户支付超时,系统退出不再受理,避免用户继续,请调用关单接口。
请求参数:
POST请求地址:
环境 |
http请求地址 |
正式环境 |
https://openapi.duolabao.com/v1/agent/order/cancel |
公共请求参数:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
agentNum |
String |
是 |
32 |
代理商编号 |
10001114596730086163400 |
customerNum |
String |
是 |
32 |
商户编号 |
10001114596730086163709 |
shopNum |
String |
是 |
32 |
店铺编号 |
10001214641783052104486 |
requestNum |
String |
是 |
32 |
流水号(用户系统内唯一) |
315080832507485 |
请求示例:
-
1
|
{
|
2
|
"agentNum:" 10001114495558121971726",
|
3
|
"customerNum": "10001114815354961923264",
|
4
|
"shopNum": "10001214815357451132294",
|
5
|
"requestNum": "10021114975797623122666"
|
5
|
}
|
返回参数JSON格式:
参数名称 |
参数类型 |
是否必填 |
最大长度 |
参数说明 |
示例值 |
result |
String |
是 |
32 |
success表示成功,fail表示失败,error表示异常 |
success |
orderNum |
String |
否 |
32 |
订单编号 |
10001214641783052104486 |
cancelAmount |
String |
是 |
32 |
取消金额 |
40.00 |
errorCode |
String |
是 |
32 |
错误码 |
customerNotExist,orderNotExist,shopNotExist |
errorMsg |
String |
是 |
32 |
错误信息 |
商户信息不存在,商户下订单信息不存在,商户下店铺不存在 |
响应示例:
-
1
|
{
|
2
|
"data": {
|
3
|
"cancelAmount": "40.0",
|
4
|
"orderNum": "10021014975797623156608"
|
5
|
},
|
6
|
"result": "success"
|
7
|
}
|
错误响应示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "customerNumNotExist",
|
4
|
"errorMsg":"customerNum not exist"
|
5
|
},
|
6
|
"result": "fail"
|
7
|
}
|
异常示例:
-
1
|
{
|
2
|
"error": {
|
3
|
"errorCode": "systemError",
|
4
|
"errorMsg":"错误描述"
|
5
|
},
|
6
|
"result": "error"
|
7
|
}
|
错误码解释:
错误码 |
错误描述 |
解决方案 |
paramsError |
requestNum must be specified |
参数不正确 |
customerNotExist |
customer not exist |
商户不存在 |
requestNumNotExist |
requestNum invalid |
流水号无效,请确认流水号 |
orderNotExist |
order not exist |
订单不存在 |
orderHasNotPayRecord |
order has not pay record |
订单无支付记录 |
accountStatusError |
account status error |
账户状态错误 |
settleProcess |
settle process |
结算处理中 |
notEnoughBlance |
not enough blance |
账户余额不足 |
accountOutRepeat |
account out repeat |
重复出账 |
orderIsRefund |
order is refund |
订单已退款 |
orderNotRefunding |
order not refunding |
订单不是退款中状态 |
orderIsComplete |
order is already pay success |
订单已支付成功 |