修改会员卡模板信息

更新时间:2025.06.22

更新会员卡的信息,包括基本信息、储值信息、开卡信息等

接口说明

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

请求方式:【PATCH】/v3/brand/partner/card-member/cards/{card_id}

请求域名:【主域名】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  路径参数

 card_id  必填   string(32)

【会员卡模板 ID】 商家创建微信会员卡模板成功后系统返回的会员卡模板ID


body  包体参数

 brand_id  必填   string(32)

【品牌ID】 商家进驻微信支付品牌商家后获得的品牌ID(灰度期间联系微信支付运营获取),用于标记该会员卡的归属方


 card_title  选填   string(10)

【卡名称】 1.可用于展示在卡面的名称 2.支持最长10个中文字 3.支持中文字、英文字符、标点


 card_color  选填   string(7)

【卡背景颜色】 用于卡片正面设计的RGB颜色编码,仅支持十六进制


 card_picture_url  选填   string(256)

【卡图片】 商家自定义会员卡背景图。仅支持通过图片上传API接口获取的图片URL地址。支持JPG/JPEG/PNG格式,建议尺寸716px*320px,图片背景色需为透明,且图片小于1M。图片上传API指引


 code_jump_information  选填   object

【会员码跳转信息】 会员码跳转的小程序信息,当会员码型为跳转商家小程序时必填。

属性

 benefits  选填   string(32)

【会员权益】 会员权益是指平台、品牌或服务机构为付费会员(或等级会员)提供的专属优惠、服务或特权。


 notify_url  选填   string(256)

【回调地址】 商家接收开卡成功回调通知的地址,需按照notify_url填写注意事项规范填写。


 need_pinned  选填   boolean

【是否置顶】 置顶卡是界面中的一种特殊展示模块,通过人工设置,使其固定在内容列表的顶部位置,确保用户优先看到。默认为false。同一个品牌下允许存在多张置顶卡,按照更新时间倒序排序。


 need_display_level  选填   boolean

【是否展示会员等级】 是否在会员卡面向用户展示等级信息,默认不展示(false)


 service_phone  选填   string(32)

【服务电话】 展示在会员卡详情内,建议填写商家固定电话


 valid_date_information  选填   object

【会员卡有效期】 会员卡有效期

属性

 member_information  选填   object

【会员中心信息】 用户点击会员卡卡面的跳转信息

属性

 points_information  选填   object

【积分信息】 若商家名片会员卡使用该功能,需传入跳转商家小程序的信息。否则不启动该功能。

属性

 balance_information  选填   object

【储值信息】 若商家名片会员卡使用该功能,需传入跳转商家小程序的信息。否则不启动该功能。

属性

 purchase_information  选填   object

【付费会员信息】 若商家名片会员卡使用该功能,需传入跳转商家小程序的信息及会员价格。否则不启动该功能。

属性

 user_information  选填   object

【用户开卡信息】 设置用户在开通会员卡时必须填写的信息

属性

请求示例

Java
Go
curl

需配合微信支付工具库 WXPayUtility 使用,请参考 Java 

1package com.java.demo;
2
3import com.java.utils.WXPayUtility; // 引用微信支付工具库,参考:https://pay.weixin.qq.com/doc/v3/partner/4014985777
4
5import com.google.gson.annotations.SerializedName;
6import com.google.gson.annotations.Expose;
7import okhttp3.MediaType;
8import okhttp3.OkHttpClient;
9import okhttp3.Request;
10import okhttp3.RequestBody;
11import okhttp3.Response;
12
13import java.io.IOException;
14import java.io.UncheckedIOException;
15import java.security.PrivateKey;
16import java.security.PublicKey;
17import java.util.ArrayList;
18import java.util.HashMap;
19import java.util.List;
20import java.util.Map;
21
22/**
23 * 修改会员卡模板信息
24 */
25public class UpdateCard {
26  private static String HOST = "https://api.mch.weixin.qq.com";
27  private static String METHOD = "PATCH";
28  private static String PATH = "/v3/brand/partner/card-member/cards/{card_id}";
29
30  public static void main(String[] args) {
31    // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/partner/4013080340
32    UpdateCard client = new UpdateCard(
33      "19xxxxxxxx",                    // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340
34      "1DDE55AD98Exxxxxxxxxx",         // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924
35      "/path/to/apiclient_key.pem",    // 商户API证书私钥文件路径,本地文件路径
36      "PUB_KEY_ID_xxxxxxxxxxxxx",      // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589
37      "/path/to/wxp_pub.pem"           // 微信支付公钥文件路径,本地文件路径
38    );
39
40    UpdateCardRequest request = new UpdateCardRequest();
41    request.cardId = "pbLatjvWOibDc5-TBnbUk1pD1";
42    request.brandId = "实例值";
43    request.cardTitle = "测试卡";
44    request.cardColor = "#FFFF00";
45    request.cardPictureUrl = "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0";
46    request.codeJumpInformation = new CodeJumpInfo();
47    request.codeJumpInformation.jumpAppid = "wxea9c30a90fs8d3fe";
48    request.codeJumpInformation.jumpPath = "/pages/code/code";
49    request.benefits = "会员折扣、专属价";
50    request.notifyUrl = "https://www.weixin.qq.com/wxpay/notify.php";
51    request.needPinned = true;
52    request.needDisplayLevel = true;
53    request.servicePhone = "010-8877xxxx";
54    request.validDateInformation = new DateInfo();
55    request.validDateInformation.type = DateType.PERMANENT;
56    request.validDateInformation.availableBeginTime = "2020-05-20T13:29:35.120+08:00";
57    request.validDateInformation.availableEndTime = "2020-05-20T13:29:35.120+08:00";
58    request.validDateInformation.availableDayAfterReceive = 30L;
59    request.memberInformation = new MemberInfo();
60    request.memberInformation.jumpAppid = "wxea9c30a90fs8d3fe";
61    request.memberInformation.jumpPath = "/pages/points/points";
62    request.pointsInformation = new PointsInfo();
63    request.pointsInformation.jumpAppid = "wxea9c30a90fs8d3fe";
64    request.pointsInformation.jumpPath = "/pages/points/points";
65    request.balanceInformation = new BalanceInfo();
66    request.balanceInformation.jumpAppid = "wxea9c30a90fs8d3fe";
67    request.balanceInformation.jumpPath = "/pages/balance/balance";
68    request.purchaseInformation = new PurchaseInfo();
69    request.purchaseInformation.price = 100L;
70    request.purchaseInformation.jumpAppid = "wxea9c30a90fs8d3fe";
71    request.purchaseInformation.jumpPath = "/pages/purchase/purchase";
72    request.userInformation = new UserInfoForm();
73    request.userInformation.commonFieldList = new ArrayList<>();
74    {
75      request.userInformation.commonFieldList.add(CommonFieldFlag.USER_FORM_FLAG_SEX);
76    };
77    request.userInformation.customFieldList = new ArrayList<>();
78    {
79      UserCustomFieldForm customFieldListItem = new UserCustomFieldForm();
80      customFieldListItem.type = CustomFieldType.CHECK_BOX;
81      customFieldListItem.name = "喜欢的运动";
82      customFieldListItem.values = new ArrayList<>();
83      {
84        customFieldListItem.values.add("篮球");
85      };
86      request.userInformation.customFieldList.add(customFieldListItem);
87    };
88    try {
89      Card response = client.run(request);
90
91      // TODO: 请求成功,继续业务逻辑
92      System.out.println(response);
93    } catch (WXPayUtility.ApiException e) {
94      // TODO: 请求失败,根据状态码执行不同的逻辑
95      e.printStackTrace();
96    }
97  }
98
99  public Card run(UpdateCardRequest request) {
100    String uri = PATH;
101    uri = uri.replace("{card_id}", WXPayUtility.urlEncode(request.cardId));
102    String reqBody = WXPayUtility.toJson(request);
103
104    Request.Builder reqBuilder = new Request.Builder().url(HOST + uri);
105    reqBuilder.addHeader("Accept", "application/json");
106    reqBuilder.addHeader("Wechatpay-Serial", wechatPayPublicKeyId);
107    reqBuilder.addHeader("Authorization", WXPayUtility.buildAuthorization(mchid, certificateSerialNo,privateKey, METHOD, uri, reqBody));
108    reqBuilder.addHeader("Content-Type", "application/json");
109    RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), reqBody);
110    reqBuilder.method(METHOD, requestBody);
111    Request httpRequest = reqBuilder.build();
112
113    // 发送HTTP请求
114    OkHttpClient client = new OkHttpClient.Builder().build();
115    try (Response httpResponse = client.newCall(httpRequest).execute()) {
116      String respBody = WXPayUtility.extractBody(httpResponse);
117      if (httpResponse.code() >= 200 && httpResponse.code() < 300) {
118        // 2XX 成功,验证应答签名
119        WXPayUtility.validateResponse(this.wechatPayPublicKeyId, this.wechatPayPublicKey,
120            httpResponse.headers(), respBody);
121
122        // 从HTTP应答报文构建返回数据
123        return WXPayUtility.fromJson(respBody, Card.class);
124      } else {
125        throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers());
126      }
127    } catch (IOException e) {
128      throw new UncheckedIOException("Sending request to " + uri + " failed.", e);
129    }
130  }
131
132  private final String mchid;
133  private final String certificateSerialNo;
134  private final PrivateKey privateKey;
135  private final String wechatPayPublicKeyId;
136  private final PublicKey wechatPayPublicKey;
137
138  public UpdateCard(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) {
139    this.mchid = mchid;
140    this.certificateSerialNo = certificateSerialNo;
141    this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath);
142    this.wechatPayPublicKeyId = wechatPayPublicKeyId;
143    this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath);
144  }
145
146  public static class UpdateCardRequest {
147    @SerializedName("brand_id")
148    public String brandId;
149  
150    @SerializedName("card_id")
151    @Expose(serialize = false)
152    public String cardId;
153  
154    @SerializedName("card_title")
155    public String cardTitle;
156  
157    @SerializedName("card_color")
158    public String cardColor;
159  
160    @SerializedName("card_picture_url")
161    public String cardPictureUrl;
162  
163    @SerializedName("code_jump_information")
164    public CodeJumpInfo codeJumpInformation;
165  
166    @SerializedName("benefits")
167    public String benefits;
168  
169    @SerializedName("notify_url")
170    public String notifyUrl;
171  
172    @SerializedName("need_pinned")
173    public Boolean needPinned;
174  
175    @SerializedName("need_display_level")
176    public Boolean needDisplayLevel;
177  
178    @SerializedName("service_phone")
179    public String servicePhone;
180  
181    @SerializedName("valid_date_information")
182    public DateInfo validDateInformation;
183  
184    @SerializedName("member_information")
185    public MemberInfo memberInformation;
186  
187    @SerializedName("points_information")
188    public PointsInfo pointsInformation;
189  
190    @SerializedName("balance_information")
191    public BalanceInfo balanceInformation;
192  
193    @SerializedName("purchase_information")
194    public PurchaseInfo purchaseInformation;
195  
196    @SerializedName("user_information")
197    public UserInfoForm userInformation;
198  }
199  
200  public static class Card {
201    @SerializedName("out_request_no")
202    public String outRequestNo;
203  
204    @SerializedName("card_id")
205    public String cardId;
206  
207    @SerializedName("brand_id")
208    public String brandId;
209  
210    @SerializedName("appid")
211    public String appid;
212  
213    @SerializedName("card_type")
214    public CardType cardType;
215  
216    @SerializedName("card_title")
217    public String cardTitle;
218  
219    @SerializedName("card_color")
220    public String cardColor;
221  
222    @SerializedName("card_picture_url")
223    public String cardPictureUrl;
224  
225    @SerializedName("code_mode")
226    public CodeMode codeMode;
227  
228    @SerializedName("code_type")
229    public CodeType codeType;
230  
231    @SerializedName("code_jump_information")
232    public CodeJumpInfo codeJumpInformation;
233  
234    @SerializedName("benefits")
235    public String benefits;
236  
237    @SerializedName("notify_url")
238    public String notifyUrl;
239  
240    @SerializedName("need_pinned")
241    public Boolean needPinned;
242  
243    @SerializedName("need_display_level")
244    public Boolean needDisplayLevel;
245  
246    @SerializedName("init_level")
247    public String initLevel;
248  
249    @SerializedName("service_phone")
250    public String servicePhone;
251  
252    @SerializedName("legal_agreement")
253    public String legalAgreement;
254  
255    @SerializedName("valid_date_information")
256    public DateInfo validDateInformation;
257  
258    @SerializedName("member_information")
259    public MemberInfo memberInformation;
260  
261    @SerializedName("points_information")
262    public PointsInfo pointsInformation;
263  
264    @SerializedName("balance_information")
265    public BalanceInfo balanceInformation;
266  
267    @SerializedName("purchase_information")
268    public PurchaseInfo purchaseInformation;
269  
270    @SerializedName("user_information")
271    public UserInfoForm userInformation;
272  
273    @SerializedName("state")
274    public CardState state;
275  
276    @SerializedName("create_time")
277    public String createTime;
278  
279    @SerializedName("modify_time")
280    public String modifyTime;
281  }
282  
283  public static class CodeJumpInfo {
284    @SerializedName("jump_appid")
285    public String jumpAppid;
286  
287    @SerializedName("jump_path")
288    public String jumpPath;
289  }
290  
291  public static class DateInfo {
292    @SerializedName("type")
293    public DateType type;
294  
295    @SerializedName("available_begin_time")
296    public String availableBeginTime;
297  
298    @SerializedName("available_end_time")
299    public String availableEndTime;
300  
301    @SerializedName("available_day_after_receive")
302    public Long availableDayAfterReceive;
303  }
304  
305  public static class MemberInfo {
306    @SerializedName("jump_appid")
307    public String jumpAppid;
308  
309    @SerializedName("jump_path")
310    public String jumpPath;
311  }
312  
313  public static class PointsInfo {
314    @SerializedName("jump_appid")
315    public String jumpAppid;
316  
317    @SerializedName("jump_path")
318    public String jumpPath;
319  }
320  
321  public static class BalanceInfo {
322    @SerializedName("jump_appid")
323    public String jumpAppid;
324  
325    @SerializedName("jump_path")
326    public String jumpPath;
327  }
328  
329  public static class PurchaseInfo {
330    @SerializedName("price")
331    public Long price;
332  
333    @SerializedName("jump_appid")
334    public String jumpAppid;
335  
336    @SerializedName("jump_path")
337    public String jumpPath;
338  }
339  
340  public static class UserInfoForm {
341    @SerializedName("common_field_list")
342    public List<CommonFieldFlag> commonFieldList;
343  
344    @SerializedName("custom_field_list")
345    public List<UserCustomFieldForm> customFieldList;
346  }
347  
348  public enum CardType {
349    @SerializedName("PURCHASE")
350    PURCHASE,
351    @SerializedName("NORMAL")
352    NORMAL,
353    @SerializedName("BALANCE")
354    BALANCE
355  }
356  
357  public enum CodeMode {
358    @SerializedName("SYSTEM_ALLOCATE")
359    SYSTEM_ALLOCATE,
360    @SerializedName("MERCHANT_ALLOCATE")
361    MERCHANT_ALLOCATE
362  }
363  
364  public enum CodeType {
365    @SerializedName("NONE_CODE")
366    NONE_CODE,
367    @SerializedName("BAR_CODE")
368    BAR_CODE,
369    @SerializedName("QR_CODE")
370    QR_CODE,
371    @SerializedName("BAR_CODE_AND_QR_CODE")
372    BAR_CODE_AND_QR_CODE,
373    @SerializedName("JUMP_MINI_PROGRAM")
374    JUMP_MINI_PROGRAM
375  }
376  
377  public enum CardState {
378    @SerializedName("CARD_EFFECTIVE")
379    CARD_EFFECTIVE,
380    @SerializedName("CARD_INVALID")
381    CARD_INVALID
382  }
383  
384  public enum DateType {
385    @SerializedName("FIX_TIME_RANGE")
386    FIX_TIME_RANGE,
387    @SerializedName("FIX_TERM")
388    FIX_TERM,
389    @SerializedName("PERMANENT")
390    PERMANENT
391  }
392  
393  public enum CommonFieldFlag {
394    @SerializedName("USER_FORM_FLAG_SEX")
395    USER_FORM_FLAG_SEX,
396    @SerializedName("USER_FORM_FLAG_NAME")
397    USER_FORM_FLAG_NAME,
398    @SerializedName("USER_FORM_FLAG_BIRTHDAY")
399    USER_FORM_FLAG_BIRTHDAY,
400    @SerializedName("USER_FORM_FLAG_ADDRESS")
401    USER_FORM_FLAG_ADDRESS,
402    @SerializedName("USER_FORM_FLAG_EMAIL")
403    USER_FORM_FLAG_EMAIL,
404    @SerializedName("USER_FORM_FLAG_CITY")
405    USER_FORM_FLAG_CITY
406  }
407  
408  public static class UserCustomFieldForm {
409    @SerializedName("type")
410    public CustomFieldType type;
411  
412    @SerializedName("name")
413    public String name;
414  
415    @SerializedName("values")
416    public List<String> values;
417  }
418  
419  public enum CustomFieldType {
420    @SerializedName("CHECK_BOX")
421    CHECK_BOX,
422    @SerializedName("RADIO")
423    RADIO
424  }
425  
426}
427

应答参数

200 OK

 out_request_no  必填   string(128)

【商家请求单号】 商家创建会员卡模板凭据号。商家自定义,注意保持唯一性,仅供参考的格式:品牌ID+时间戳+流水号。字符仅允许包含英文半角的数字、字母、连接线-和下划线_


 card_id  必填   string(32)

【会员卡模板 ID】 商家创建微信会员卡模板成功后系统返回的会员卡模板ID


 brand_id  必填   string(32)

【品牌ID】 商家进驻微信支付品牌商家后获得的品牌ID(灰度期间联系微信支付运营获取),用于标记该会员卡的归属方


 appid  必填   string

【商家AppID】 商家的AppID,可以是服务号、订阅号、公众号、小程序的AppID。1、该AppID用于获取会员OpenID。2、该AppID需要与会员卡归属品牌有B-A关系。


 card_type  必填   string

【会员卡类型】 支持付费、普通、储值 3 种类型。

可选取值

  • PURCHASE:  付费

  • NORMAL:  普通

  • BALANCE:  储值​


 card_title  必填   string(10)

【卡名称】 1.可用于展示在卡面的名称 2.支持最长10个中文字 3.支持中文字、英文字符、标点


 card_color  必填   string(7)

【卡背景颜色】 用于卡片正面设计的RGB颜色编码,仅支持十六进制


 card_picture_url  必填   string(256)

【卡图片】 商家自定义会员卡背景图。仅支持通过图片上传API接口获取的图片URL地址。支持JPG/JPEG/PNG格式,建议尺寸716px*320px,图片背景色需为透明,且图片小于1M。图片上传API指引


 code_mode  必填   string

【会员卡code分配类型】 1、会员卡code是会员在一个会员卡模版下唯一身份标识,平台支持2种分配类型:(1)SYSTEM_ALLOCATE 微信支付系统分配,用户领取会员卡时从微信系统分配12位数字作为会员code;(2)MERCHANT_ALLOCATE 商家预存code,商家可提前通过导入预存code接口导入code,用户领取会员卡时平台从商家导入的code中随机分配作为会员code 2、会员卡code分配模式若为“系统分配”,不支持修改为“商家分配”。

可选取值

  • SYSTEM_ALLOCATE:  系统分配

  • MERCHANT_ALLOCATE:  商家分配


 code_type  必填   string

【会员码型】 会员码支持不展示码/二维码/条形码/二维码+条形码/跳转商家小程序5种设置。

可选取值

  • NONE_CODE:  不显示任何码型

  • BAR_CODE:  条形码

  • QR_CODE:  二维码

  • BAR_CODE_AND_QR_CODE:  条形码和二维码

  • JUMP_MINI_PROGRAM:  跳转商家小程序


 code_jump_information  选填   object

【会员码跳转信息】 会员码跳转的小程序信息,当会员码型为跳转商家小程序时必填。

属性

 benefits  必填   string(32)

【会员权益】 会员权益是指平台、品牌或服务机构为付费会员(或等级会员)提供的专属优惠、服务或特权。


 notify_url  必填   string(256)

【回调地址】 商家接收开卡成功回调通知的地址,需按照notify_url填写注意事项规范填写。


 need_pinned  选填   boolean

【是否置顶】 置顶卡是界面中的一种特殊展示模块,通过人工设置,使其固定在内容列表的顶部位置,确保用户优先看到。默认为false。同一个品牌下允许存在多张置顶卡,按照更新时间倒序排序。


 need_display_level  选填   boolean

【是否展示会员等级】 是否在会员卡面向用户展示等级信息,默认不展示(false)


 init_level  选填   string(10)

【会员初始等级】 展示字段,商家可以自定义填写内容。如果选择了展示会员等级,必填init_level,作为新用户开卡后的初始等级。如因商家业务规则需要变更某会员等级,可通过更新用户会员卡接口更新等级信息。


 service_phone  选填   string(32)

【服务电话】 展示在会员卡详情内,建议填写商家固定电话


 legal_agreement  选填   string(2048)

【商家法务协议】 商家法务协议是用户与商家之间签订的具有法律效力的合同文件,旨在明确双方在交易、服务提供、权利义务等方面的规则,以保障交易安全、规范商业行为,并在纠纷发生时提供法律依据。


 valid_date_information  必填   object

【会员卡有效期】 会员卡有效期

属性

 member_information  必填   object

【会员中心信息】 用户点击会员卡卡面的跳转信息

属性

 points_information  选填   object

【积分信息】 若商家名片会员卡使用该功能,需传入跳转商家小程序的信息。否则不启动该功能。

属性

 balance_information  选填   object

【储值信息】 若商家名片会员卡使用该功能,需传入跳转商家小程序的信息。否则不启动该功能。

属性

 purchase_information  选填   object

【付费会员信息】 若商家名片会员卡使用该功能,需传入跳转商家小程序的信息及会员价格。否则不启动该功能。

属性

 user_information  选填   object

【用户开卡信息】 设置用户在开通会员卡时必须填写的信息

属性

 state  必填   string

【状态】 会员卡状态信息

可选取值

  • CARD_EFFECTIVE:  生效中

  • CARD_INVALID:  已失效


 create_time  必填   string(32)

【创建时间】 创建会员卡的时间,需遵循 RFC3339 标准格式:yyyy-MM-DDTHH:mm:ss+TIMEZONE。yyyy-MM-DD 表示年月日;T 字符用于分隔日期和时间部分;HH:mm:ss 表示具体的时分秒;TIMEZONE 表示时区(例如,+08:00 对应东八区时间,即北京时间)。示例:2015-05-20T13:29:35+08:00 表示北京时间2015年5月20日13点29分35秒。


 modify_time  必填   string(32)

【更新时间】 更新会员卡的时间,需遵循 RFC3339 标准格式:yyyy-MM-DDTHH:mm:ss+TIMEZONE。yyyy-MM-DD 表示年月日;T 字符用于分隔日期和时间部分;HH:mm:ss 表示具体的时分秒;TIMEZONE 表示时区(例如,+08:00 对应东八区时间,即北京时间)。示例:2015-05-20T13:29:35+08:00 表示北京时间2015年5月20日13点29分35秒。

应答示例

200 OK

1{
2  "out_request_no" : "100002322019090134234sfdf",
3  "card_id" : "pbLatjvWOibDc5-TBnbUk1pD12o0",
4  "brand_id" : "1004",
5  "appid" : "wxea9c30890f48d5ae",
6  "card_type" : "NORMAL",
7  "card_title" : "测试卡",
8  "card_color" : "#FFFF00",
9  "card_picture_url" : "https://wxpaylogo.qpic.cn/wxpaylogo/xxxxx/0",
10  "code_mode" : "SYSTEM_ALLOCATE",
11  "code_type" : "BAR_CODE",
12  "code_jump_information" : {
13    "jump_appid" : "wxea9c30a90fs8d3fe",
14    "jump_path" : "/pages/code/code"
15  },
16  "benefits" : "会员折扣、专属价",
17  "notify_url" : "https://www.weixin.qq.com/wxpay/notify.php",
18  "need_pinned" : true,
19  "need_display_level" : true,
20  "init_level" : "白银会员",
21  "service_phone" : "010-8877xxxx",
22  "legal_agreement" : "商家需在 48 小时内发货,若商品存在质量问题,用户可在 7 天内申请退货。",
23  "valid_date_information" : {
24    "type" : "PERMANENT",
25    "available_begin_time" : "2020-05-20T13:29:35.120+08:00",
26    "available_end_time" : "2020-05-20T13:29:35.120+08:00",
27    "available_day_after_receive" : 30
28  },
29  "member_information" : {
30    "jump_appid" : "wxea9c30a90fs8d3fe",
31    "jump_path" : "/pages/points/points"
32  },
33  "points_information" : {
34    "jump_appid" : "wxea9c30a90fs8d3fe",
35    "jump_path" : "/pages/points/points"
36  },
37  "balance_information" : {
38    "jump_appid" : "wxea9c30a90fs8d3fe",
39    "jump_path" : "/pages/balance/balance"
40  },
41  "purchase_information" : {
42    "price" : 100,
43    "jump_appid" : "wxea9c30a90fs8d3fe",
44    "jump_path" : "/pages/purchase/purchase"
45  },
46  "user_information" : {
47    "common_field_list" : [
48      "USER_FORM_FLAG_SEX"
49    ],
50    "custom_field_list" : [
51      {
52        "type" : "CHECK_BOX",
53        "name" : "喜欢的运动",
54        "values" : [
55          "篮球"
56        ]
57      }
58    ]
59  },
60  "state" : "CARD_EFFECTIVE",
61  "create_time" : "2020-05-20T13:29:35.120+08:00",
62  "modify_time" : "2020-05-20T13:29:35.120+08:00"
63}
64

 

错误码

公共错误码

状态码

错误码

描述

解决方案

400

PARAM_ERROR

参数错误

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

400

INVALID_REQUEST

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

请参阅 接口规则

401

SIGN_ERROR

验证不通过

请参阅 签名常见问题

500

SYSTEM_ERROR

系统异常,请稍后重试

请稍后重试

 

更多技术问题
技术咨询
反馈
咨询
目录
置顶