失效用户商品券组

更新时间:2025.11.20

服务商可以通过本接口将用户商品券组内的所有商品券同步失效

前置条件:已经给用户发券成功,且商品券的 usage_mode 为 PROGRESSIVE_BUNDLE

频率限制:500/s

接口说明

支持商户:【普通服务商】

请求方式:【POST】/v3/marketing/partner/product-coupon/users/{openid}/coupon-bundles/{user_coupon_bundle_id}/deactivate

请求域名:【主域名】https://api.mch.weixin.qq.com 使用该域名将访问就近的接入点

     【备域名】https://api2.mch.weixin.qq.com 使用该域名将访问异地的接入点 ,指引点击查看

请求参数

Header  HTTP头参数

 Authorization  必填 string

请参考签名认证生成认证信息


 Accept  必填 string

请设置为application/json


 Content-Type  必填 string

请设置为application/json


path  路径参数

 user_coupon_bundle_id  必填   string(40)

【用户券组ID】 用户券组的唯一标识,【向用户发放商品券批次组】时由微信支付生成,本接口会同步失效用户商品券组内所有用户商品券


 openid  必填   string

【用户OpenID】 OpenID信息,用户在AppID下的唯一标识,获取方式参考OpenID


body  包体参数

 product_coupon_id  必填   string

【商品券ID】 商品券的唯一标识,创建商品券时由微信支付生成


 stock_bundle_id  必填   string

【批次组ID】 商品券批次组的唯一标识,【创建商品券(多次优惠)】或【添加商品券批次组】时由微信支付生成,请确保该批次组属于 product_coupon_id 对应的商品券


 appid  必填   string

【公众账号ID】 公众账号ID也称AppID,是(微信开放平台、微信公众平台)为开发者提供的一个唯一标识,用于识别开发者的应用程序(APP、小程序、公众号)。 开发者需要先在微信开放平台或微信公众平台中申请ID,然后在服务商平台中绑定,详见服务商商户号与AppID账号关联管理


 out_request_no  必填   string(40)

【失效请求单号】 品牌失效用户商品券的请求流水号,品牌侧需保持唯一性,可使用 数字、大小写字母、下划线_、短横线- 组成,长度在6-40个字符之间


 deactivate_reason  必填   string(150)

【失效原因】 记录用户商品券的失效原因,长度不超过150个UTF-8字符


 brand_id  必填   string

【品牌ID】 微信支付为品牌方分配的唯一标识,该品牌应与服务商存在授权关系

请求示例

curl
Java
Go

POST

1curl -X POST \
2  https://api.mch.weixin.qq.com/v3/marketing/partner/product-coupon/users/oh-394z-6CGkNoJrsDLTTUKiAnp4/coupon-bundles/123446565767/deactivate \
3  -H "Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"1900000001\",..." \
4  -H "Accept: application/json" \
5  -H "Content-Type: application/json" \
6  -d '{
7    "product_coupon_id" : "1002323",
8    "stock_bundle_id" : "100232301",
9    "appid" : "wx233544546545989",
10    "out_request_no" : "1002600620019090123144054436",
11    "deactivate_reason" : "商品已下线,使用户商品券失效",
12    "brand_id" : "120344"
13  }'
14

应答参数

200 OK

 user_coupon_bundle_id  必填   string(40)

【用户券组ID】 用户券组的唯一标识,【向用户发放商品券批次组】时由微信支付生成


 user_product_coupon_list  必填   array[object]

【用户商品券列表】 用户商品券列表

属性

应答示例

200 OK

1{
2  "user_coupon_bundle_id" : "123446565767",
3  "user_product_coupon_list" : [
4    {
5      "coupon_code" : "123446565767",
6      "coupon_state" : "USED",
7      "valid_begin_time" : "2025-01-01T00:00+08:00",
8      "valid_end_time" : "2025-01-30T23:59:59+08:00",
9      "receive_time" : "2025-01-01T09:10:00+08:00",
10      "send_request_no" : "MCHSEND202003101234",
11      "send_channel" : "BRAND_MANAGE",
12      "confirm_request_no" : "MCHCONFIRM202003101234",
13      "confirm_time" : "2025-01-20T13:29:35+08:00",
14      "deactivate_request_no" : "1002600620019090123143254436",
15      "deactivate_time" : "2025-01-20T13:29:35+08:00",
16      "deactivate_reason" : "商品已下线",
17      "progressive_bundle_usage_detail" : {
18        "use_request_no" : "MCHUSE202003101234",
19        "use_time" : "2025-07-20T13:29:35+08:00",
20        "associated_order_info" : {
21          "transaction_id" : "4200000000123456789123456789",
22          "out_trade_no" : "trade_no_20250724123456",
23          "mchid" : "1234567890",
24          "sub_mchid" : "1234567890"
25        },
26        "return_request_no" : "MCHRETURN202003101234",
27        "return_time" : "2025-07-20T14:29:35+08:00"
28      },
29      "user_product_coupon_bundle_info" : {
30        "user_coupon_bundle_id" : "7014123823561283749832",
31        "user_coupon_bundle_index" : 0,
32        "total_count" : 10,
33        "used_count" : 3
34      },
35      "product_coupon" : {
36        "product_coupon_id" : "1002323",
37        "scope" : "ALL",
38        "type" : "NORMAL",
39        "usage_mode" : "SINGLE",
40        "single_usage_info" : {
41          "normal_coupon" : {
42            "threshold" : 10000,
43            "discount_amount" : 100
44          },
45          "discount_coupon" : {
46            "threshold" : 10000,
47            "percent_off" : 30
48          }
49        },
50        "progressive_bundle_usage_info" : {
51          "count" : 10,
52          "interval_days" : 1
53        },
54        "display_info" : {
55          "name" : "全场满100可减10元",
56          "image_url" : "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx",
57          "background_url" : "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx",
58          "detail_image_url_list" : [
59            "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx"
60          ],
61          "original_price" : 10000,
62          "combo_package_list" : [
63            {
64              "name" : "咖啡2选1",
65              "pick_count" : 3,
66              "choice_list" : [
67                {
68                  "name" : "美式",
69                  "price" : 10000,
70                  "count" : 2,
71                  "image_url" : "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx",
72                  "mini_program_appid" : "wx4fd12345678",
73                  "mini_program_path" : "/pages/index/index"
74                }
75              ]
76            }
77          ]
78        },
79        "out_product_no" : "Product_1234567890",
80        "state" : "AUDITING",
81        "deactivate_request_no" : "1002600620019090123143254436",
82        "deactivate_time" : "2025-06-20T13:29:35+08:00",
83        "deactivate_reason" : "商品已下架",
84        "brand_id" : "120344"
85      },
86      "stock" : {
87        "product_coupon_id" : "200000001",
88        "stock_id" : "123456789",
89        "remark" : "满减券",
90        "coupon_code_mode" : "UPLOAD",
91        "coupon_code_count_info" : {
92          "total_count" : 10000,
93          "available_count" : 999
94        },
95        "stock_send_rule" : {
96          "max_count" : 10000000,
97          "max_count_per_day" : 10000,
98          "max_count_per_user" : 1
99        },
100        "progressive_bundle_usage_rule" : {
101          "coupon_available_period" : {
102            "available_begin_time" : "2025-01-01T00:00:00+08:00",
103            "available_end_time" : "2025-10-01T00:00:00+08:00",
104            "available_days" : 10,
105            "wait_days_after_receive" : 1,
106            "weekly_available_period" : {
107              "day_list" : [
108                "MONDAY"
109              ],
110              "day_period_list" : [
111                {
112                  "begin_time" : 60,
113                  "end_time" : 86399
114                }
115              ]
116            },
117            "irregular_available_period_list" : [
118              {
119                "begin_time" : "2025-01-01T00:00:00+08:00",
120                "end_time" : "2025-10-01T00:00:00+08:00"
121              }
122            ]
123          },
124          "normal_coupon" : {
125            "threshold" : 10000,
126            "discount_amount" : 100
127          },
128          "discount_coupon" : {
129            "threshold" : 10000,
130            "percent_off" : 30
131          },
132          "exchange_coupon" : {
133            "threshold" : 10000,
134            "exchange_price" : 100
135          }
136        },
137        "stock_bundle_info" : {
138          "stock_bundle_id" : "123456789",
139          "stock_bundle_index" : 0
140        },
141        "usage_rule_display_info" : {
142          "coupon_usage_method_list" : [
143            "MINI_PROGRAM"
144          ],
145          "mini_program_appid" : "wx1234567890",
146          "mini_program_path" : "/pages/index/product",
147          "app_path" : "https://www.example.com/jump-to-app",
148          "usage_description" : "全场可用",
149          "coupon_available_store_info" : {
150            "description" : "可在上海市区的所有门店使用,详细列表参考小程序内信息为准",
151            "mini_program_appid" : "wx1234567890",
152            "mini_program_path" : "/pages/index/store-list"
153          }
154        },
155        "coupon_display_info" : {
156          "code_display_mode" : "QRCODE",
157          "background_color" : "Color010",
158          "entrance_mini_program" : {
159            "appid" : "wx1234567890",
160            "path" : "/pages/index/product",
161            "entrance_wording" : "欢迎选购",
162            "guidance_wording" : "获取更多优惠"
163          },
164          "entrance_official_account" : {
165            "appid" : "wx1234567890"
166          },
167          "entrance_finder" : {
168            "finder_id" : "gh_12345678",
169            "finder_video_id" : "UDFsdf24df34dD456Hdf34",
170            "finder_video_cover_image_url" : "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx"
171          }
172        },
173        "notify_config" : {
174          "notify_appid" : "wx4fd12345678"
175        },
176        "store_scope" : "SPECIFIC",
177        "sent_count_info" : {
178          "total_count" : 100,
179          "today_count" : 10
180        },
181        "state" : "SENDING",
182        "deactivate_request_no" : "1002600620019090123143254436",
183        "deactivate_time" : "2025-01-01T00:00+08:00",
184        "deactivate_reason" : "批次信息有误,重新创建",
185        "brand_id" : "120344"
186      },
187      "attach" : "example_attach",
188      "channel_custom_info" : "example_channel_custom_info",
189      "coupon_tag_info" : {
190        "coupon_tag_list" : [
191          "MEMBER"
192        ],
193        "member_tag_info" : {
194          "member_card_id" : "MemberCardId_1234567890"
195        }
196      },
197      "brand_id" : "120344"
198    }
199  ]
200}
201

 

错误码

以下是本接口返回的错误码列表。详细错误码规则,请参考微信支付接口规则-错误码和错误提示

状态码

错误码

描述

解决方案

400

PARAM_ERROR

参数错误

请根据错误提示正确传入参数

400

INVALID_REQUEST

HTTP 请求不符合微信支付 APIv3 接口规则

请参阅 接口规则

401

SIGN_ERROR

验证不通过

请参阅 签名常见问题

500

SYSTEM_ERROR

系统异常,请稍后重试

请稍后重试

400

INVALID_REQUEST

传入参数不符合业务规则

请参考文档中对每个字段的要求以及组合要求,确认请求参数是否满足

404

NOT_FOUND

未找到 product_coupon_id 对应的商品券

请确认 product_coupon_id 存在且属于当前品牌

404

NOT_FOUND

未找到 stock_id 对应的商品券批次

请确认 stock_id 存在且属于当前商品券

404

NOT_FOUND

未找到 coupon_code 对应的用户商品券

请确认 coupon_code 存在且属于当前商品券批次,且已发放给用户

429

RATELIMIT_EXCEEDED

请求超过接口频率限制

请稍后使用原参数重试

 

元宝AI
反馈
目录
置顶