Skip to content

上传预存code

商家券的Code码可由微信后台随机分配,同时支持商户自定义。如商家已有自己的优惠券系统,可直接使用自定义模式。即商家预先向微信支付上传券Code,当券在发放时,微信支付自动从已导入的Code中随机取值(不能指定),派发给用户。 官方文档

js
wxpay
.
v3
.
marketing
.
busifavor
.
stocks
.
_stock_id_
.
couponcodes
.
post
({
coupon_code_list
,
upload_request_no
,
}, {
stock_id
, })
.
then
(
({
data
: {
stock_id
,
total_count
,
success_count
,
success_codes
,
success_time
,
fail_count
,
fail_codes
,
exist_codes
,
duplicate_codes
,
}, }) => ({
stock_id
,
total_count
,
success_count
,
success_codes
,
success_time
,
fail_count
,
fail_codes
,
exist_codes
,
duplicate_codes
,
}) )

查询预存code列表

官方文档

js
wxpay
.
v3
.
marketing
.
busifavor
.
stocks
.
_stock_id_
.
couponcodes
.
get
({
stock_id
,
params
,
}) .
then
(
({
data
: {
stock_id
,
total_count
,
limit
,
offset
,
data
,
}, }) => ({
stock_id
,
total_count
,
limit
,
offset
,
data
,
}) )

Released under the MIT License. (SITEMAP)