# 创建福利券批次
# 接口说明
# 接口地址
https://open.wecard.qq.com/cgi-bin/pay/provider/voucher/create
# 请求方法
POST
# 请求参数
access_token=[鉴权token]
参数 | 是否必填 | 类型 | 实例 | 说明 |
---|---|---|---|---|
access_token | 是 | String | 应用有效凭证 |
# 请求body(json)
{"name":"福利券测试","doorsill":20,"rule_type":1,"timestamp":"DREzmSu8WK9at/MZ2ixf0/ndAPqK0HLENww=","nonce":"JBqIP9IWg8DE","rule_mch_ids":"99694146,99694147","send_notify":1,"rule_expire_in":4,"par_value":10,"consume_during":[{"begin":"00:00","end":"15:59"},{"begin":"18:00","end":"23:59"}],"rule_begin_date":"2023-03-09","rule_end_date":"2023-03-10"}
参数 | 是否必填 | 类型 | 实例 | 说明 | |
---|---|---|---|---|---|
name | 是 | String | 券名称 | ||
par_value | 是 | Integer | 面额(分) | ||
doorsill | 是 | Integer | 使用门槛金额(分),消费满多少钱可使用券 | ||
rule_type | 是 | Integer | 发放规则;0:仅发放一次,1:每天自动发放(凌晨4点前发放完毕) | ||
rule_begin_date | 是 | String | rule_type为0时表示券使用有效日期的开始时间,rule_type为1时表示自动发放的开始时间,格式为 YYYY:mm:dd | ||
rule_end_date | 是 | String | rule_type为0时表示券使用有效日期的截止时间,rule_type为1时表示自动发放的结束时间,格式为 YYYY:mm:dd | ||
rule_expire_in | 否 | Integer | rule_type为1时必填,表示领券后多少天内可用 | ||
rule_mch_ids | 否 | String | 消费范围,商户id之间用逗号分割,不传表示全部商户可以消费 | ||
consume_during(单次发放可不传) | begin | 否 | String | 指定可以使用券时段的开始时间;格式为 HH:mm:ss | |
end | 否 | String | 指定可以使用券时段的结束时间;格式为 HH:mm:ss | ||
send_notify | 否 | Integer | 用户到账后是否发送通知给用户;0:不发通知,1:发通知;默认不发 | ||
timestamp | 是 | String | 当前unix时间戳(需要对称加密再进行Base64转换) | ||
nonce | 是 | String | 随机字符串(加密需使用) | ||
associate_data | 是 | String | 固定传 create(加密需使用) |
# 响应说明
{
"code": 0,
"message": "成功",
"data": {
"response_id": "xxxxxx-xxxx-xxxx-xxxxxx",
"voucher_id": "1020"
}
}
参数 | 类型 | 实例 | 说明 | |
---|---|---|---|---|
code | Integer | 0为成功,其它为失败 | ||
message | String | 响应说明 | ||
data | response_id | String | 本次请求响应id | |
voucher_id | String | 券批次号 |
← 查询补贴发放批次的发放名单 添加接收人 →