撤销核销通知
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/api/v2/result_callback
接口说明
基本信息
基本信息 | |
---|---|
HTTP URL | 参考行业模版使用指南配置消息 |
HTTP Method | POST |
msg 字段
字段名 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
app_id | string | 是 | 小程序 app_id | tt7cd50a68e3b208fc01 |
status | string | 是 | 撤销核销状态枚举值:SUCCESS:撤销核销成功FAIL:撤销核销失败 | SUCCESS |
item_order_id | string | 是 | 交易系统商品单号 | 800000000135213440013213630 |
cannot_cancel_msg | string | 否 | 撤销核销失败原因 | |
order_info | object | 是 | 小程序交易系统订单信息 | {"order_id":"1000000096288643630"} |
time_card | object | 否 | 次卡次数 | {"times_available":2,"times_used":0} |
cp_extra | string | 否 | 预下单时开发者传入的透传字段(如果开发者未传,此字段为空) | |
cancel_time | int64 | 是 | 撤销核销时间 | 1679897677 |
code | string | 否 | 用户券码 | 100000045385072 |
order_info 字段
字段名 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
order_id | string | 是 | 交易系统订单号 | 1000000096288643630 |
time_card 字段
字段名 | 类型 | 是否必填 | 描述 | 示例值 |
---|---|---|---|---|
times_available | int64 | 是 | 剩余可用次数 | 2 |
times_used | int64 | 是 | 已使用次数 | 0 |
msg 段内容示例
{
"app_id": "tt7cd50a68e3b208fc01",
"status": "SUCCESS",
"cannot_cancel_msg": "",
"order_info": {
"order_id": "1000000096288643630"
},
"cp_extra": "{\"use_trade_delivery\":1}",
"cancel_time": 1679897677,
"item_order_id": "800000000135213440013213630",
"time_card": {
"times_available": 2,
"times_used": 0
},
"code": "100000045385072"
}
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/api/v2/result_callback' \
--header 'Content-Type: application/json' \
--data-raw '{
"version": "2.0",
"msg": "{\"app_id\":\"tt7cd50a68e3b208fc01\",\"status\":\"SUCCESS\",\"cannot_cancel_msg\":\"\",\"order_info\":{\"order_id\":\"1000000096288643630\"},\"cp_extra\":\"{\\\"use_trade_delivery\\\":1}\",\"cancel_time\":1679897677,\"item_order_id\":\"800000000135213440013213630\",\"time_card\":{\"times_available\":2,\"times_used\":0},\"cancel_mode\":\"laike\",\"code\":\"100000045385072\"}",
"type": "verify_cancel"
}'
响应示例响应示例
200 - 成功示例
{
"err_no": 0,
"err_tips": "success"
}
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
Body 参数application/json