# 创建计划
# 请求方法:
POST(application/json)
# 域名
体验环境:
tygate.weixiao.qq.com
线上环境:
open.wecard.qq.com
# 请求地址:
https://DOMAIN/cgi-bin/pay/app/app-create-plan?access_token=ACCESS_TOKEN
# 参数说明:
{
"sub_appid": "1010343033_99692268",
"plan_id": "0001",
"plan_name": "学生餐扣费计划",
"plan_dates": ["2022-02-22", "2022-02-23", "2022-02-24"],
"plan_items": [
{ "item_id": "001", "item_name": "学生早餐", "item_amount": 1 }
],
"notify_url": "https://www.lican.xyz",
"debit_mode": "timely_debit",
"confirm_time": "18:00:00"
}
参数 | 是否必填 | 类型 | 实例 | 说明 | |
---|---|---|---|---|---|
sub_appid | 是 | String(128) | 1010343033_99692268 | 商户ID | |
plan_id | 是 | string(128) | 0001 | 计划ID[应用侧生成,作为后续该计划操作(修改|删除)的唯一ID] | |
plan_name | 是 | string(128) | 学生餐扣费计划 | 计划名称 | |
plan_dates | 是 | array | ["2022-02-22", "2022-02-23","2022-02-24"] | 计划扣费允许的时间点[时间跨度不得超过30天],扣费时间不能为当日和当日之前 | |
plan_items | item_id | 是 | string(128) | 001 | 扣费项目ID,作为后续该计划中项目操作(修改|删除)的唯一ID |
item_name | 是 | string(256) | 学生餐早餐扣费 | 扣费项名称 | |
item_amount | 是 | integer | 1000 | 单位:分[最高金额可在B端商户修改] | |
notify_url | 否 | string(128) | https://www.xxx.com/xxx | 通知URL,默认不通知 | |
debit_mode | 否 | string(128) | timely_debit | 扣款模式,默认timely_debit[timely_debit, immediately_debit] | |
confirm_time | 否 | string(128) | 18:00:00 | 最后确认时间,默认23:59:59 |
# 响应说明:
正确时返回的 json 数据包如下:
{
"code": 0,
"data": {
"plan_id": "0001"
},
"message": "创建计划成功"
}
参数 | 必填 | 类型 | 实例 | 说明 | |
---|---|---|---|---|---|
code | 是 | Integer | 0 | 响应状态码,0为成功 | |
data | plan_id | 是 | sring(128) | 0001 | 计划ID |
message | 是 | string(128) | 创建计划成功 | 业务提示 |