【单券-单品-兑换券】API请求示例

更新时间:2025.12.25
||

 

curl
Java
Go

 

1## 场景5: 单券-单品-兑换券 (usage_mode=SINGLE, scope=SINGLE, type=EXCHANGE)
2
3
4```bash
5curl -X POST \
6  https://api.mch.weixin.qq.com/v3/marketing/partner/product-coupon/product-coupons \
7  -H "Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"服务商商户号\",..." \
8  -H "Accept: application/json" \
9  -H "Content-Type: application/json" \
10  -d '{
11    "out_request_no": "SINGLE_SINGLE_EXCHANGE_20250101_005", # 必填,创建请求单号
12    "brand_id": "120344", # 必填,品牌ID
13    "scope": "SINGLE", # 必填,优惠范围:SINGLE=单品券(兑换券仅支持单品)
14    "type": "EXCHANGE", # 必填,商品券类型:EXCHANGE=兑换券(仅scope=SINGLE时可用)
15    "usage_mode": "SINGLE", # 必填,使用模式:SINGLE=单券模式
16    
17    # 注意:scope=SINGLE时,不在single_usage_info中配置优惠规则
18    
19    "display_info": { # 必填,商品券展示信息
20      "name": "9.9元兑换原价99元商品", # 必填,商品券名称
21      "image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 必填,商品图片URL
22      "background_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 必填,背景图URL
23      "detail_image_url_list": [ # 选填,详情图URL列表
24        "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx"
25      ],
26      "original_price": 9900, # 当scope=SINGLE时必填,商品原价,单位为分(99元)
27      "combo_package_list": [ # 当scope=SINGLE时选填,套餐组合列表
28        {
29          "name": "超值套餐", # 必填,套餐名称
30          "pick_count": 3, # 必填,可选单品数量
31          "choice_list": [ # 必填,单品列表
32            {
33              "name": "汉堡", # 必填,单品名称
34              "price": 1500, # 必填,单品价格,单位为分(15元)
35              "count": 1, # 必填,单品数量
36              "image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 选填
37              "mini_program_appid": "wx1234567890", # 选填
38              "mini_program_path": "/pages/index/product" # 选填
39            },
40            {
41              "name": "鸡翅", # 必填,单品名称
42              "price": 1200, # 必填,单品价格,单位为分
43              "count": 1, # 必填,单品数量
44              "image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 选填
45              "mini_program_appid": "wx1234567890", # 选填
46              "mini_program_path": "/pages/index/product" # 选填
47            },
48            {
49              "name": "可乐", # 必填,单品名称
50              "price": 500, # 必填,单品价格,单位为分
51              "count": 1, # 必填,单品数量
52              "image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx", # 选填
53              "mini_program_appid": "wx1234567890", # 选填
54              "mini_program_path": "/pages/index/product" # 选填
55            }
56          ]
57        }
58      ]
59    },
60    
61    "out_product_no": "Product_SINGLE_005", # 选填,外部商品ID
62    
63    "stock": { # 必填,批次信息
64      "remark": "8月单品兑换批次", # 选填,备注
65      "coupon_code_mode": "WECHATPAY", # 必填,券Code分配模式
66      
67      "stock_send_rule": { # 必填,发放规则
68        "max_count": 10000000, # 必填,总发放次数上限
69        "max_count_per_day": 100000, # 选填,每日发放上限
70        "max_count_per_user": 1 # 必填,每用户领取上限
71      },
72      
73      "single_usage_rule": { # 当usage_mode=SINGLE时必填,单券使用规则
74        "coupon_available_period": { # 必填,券可核销时间
75          "available_begin_time": "2025-08-01T00:00:00+08:00", # 必填,开始时间
76          "available_end_time": "2025-08-31T23:59:59+08:00", # 必填,结束时间
77          "available_days": 30, # 选填,生效后N天有效
78          "wait_days_after_receive": 0, # 选填,领取后N天生效
79          "weekly_available_period": { # 选填,每周可用时间
80            "day_list": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"] # 当配置此对象时必填
81          },
82          "irregular_available_period_list": [ # 选填,无规律可用时间段
83            {
84              "begin_time": "2025-08-15T00:00:00+08:00", # 当配置此列表时必填
85              "end_time": "2025-08-15T23:59:59+08:00" # 当配置此列表时必填
86            }
87          ]
88        },
89        "exchange_coupon": { # 当type=EXCHANGE时必填,兑换券使用规则
90          "threshold": 0, # 必填,门槛金额,单位为分,兑换券通常为0
91          "exchange_price": 990 # 必填,兑换价格,单位为分,9.9元兑换填990
92        }
93      },
94      
95      "usage_rule_display_info": { # 必填,使用规则展示信息
96        "coupon_usage_method_list": ["OFFLINE", "MINI_PROGRAM", "PAYMENT_CODE"], # 必填,使用方式
97        "mini_program_appid": "wx1234567890", # 当coupon_usage_method_list包含MINI_PROGRAM时必填
98        "mini_program_path": "/pages/index/product", # 当coupon_usage_method_list包含MINI_PROGRAM时必填
99        "usage_description": "用9.9元兑换原价99元商品", # 必填,使用说明
100        "coupon_available_store_info": { # 选填,可用门店信息
101          "description": "所有门店可用", # 当配置此对象时必填
102          "mini_program_appid": "wx1234567890", # 选填
103          "mini_program_path": "/pages/index/store-list" # 选填
104        }
105      },
106      
107      "coupon_display_info": { # 必填,用户券展示信息
108        "code_display_mode": "QRCODE", # 必填,Code展示模式
109        "background_color": "Color010", # 选填,背景颜色
110        "entrance_mini_program": { # 选填,小程序入口
111          "appid": "wx1234567890", # 当配置此对象时必填
112          "path": "/pages/index/product", # 当配置此对象时必填
113          "entrance_wording": "立即兑换", # 当配置此对象时必填
114          "guidance_wording": "获取更多优惠" # 当配置此对象时必填
115        },
116        "entrance_official_account": { # 选填,公众号入口
117          "appid": "wx1234567890" # 当配置此对象时必填
118        },
119        "entrance_finder": { # 选填,视频号入口
120          "finder_id": "gh_12345678", # 当配置此对象时必填
121          "finder_video_id": "UDFsdf24df34dD456Hdf34", # 当配置此对象时必填
122          "finder_video_cover_image_url": "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/xxx" # 当配置此对象时必填
123        }
124      },
125      
126      "notify_config": { # 必填,事件通知配置
127        "notify_appid": "wx4fd12345678" # 必填
128      },
129      
130      "store_scope": "NONE" # 必填,可用门店范围
131    }
132  }'
133```

 

元宝AI
反馈
目录
置顶