失效用户商品券组

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

 

错误码

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

状态码

错误码

描述

解决方案

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
反馈
目录
置顶