# Member Subscriptions
# I. Product Introduction
# 1. Core Features
One-time subscription, multiple charges: After signing a contract with the user once, charges can be initiated periodically to renew the membership.
Member Subscription Messages: For users with a subscription, the WeChat Open Platform will provide special “member-exclusive” long-term subscription messages. For details: Member Subscription Message Integration Guide
Only available for Android devices
# 2. Integration Mode Explanation
# 3. User Interaction Example
# 4. Charging Details
# 4.1 First Charge (within 12 hours of user signing up)
| Verification Item | Business Rule |
|---|---|
| Charging Permission | User has a contract with Mini Program and the contract is valid at the time of charge |
| Charge Time | Within 12 hours after user signs up |
| Charge Amount | Minimum 1 yuan, maximum equal to item price (not exceeding 5,000 yuan) |
# 4.2 Non-first Charge (after 12 hours of user signing up)
| Verification Item | Business Rule |
|---|---|
| Charging Permission | User has a contract with Mini Program and the contract is valid at the time of charge |
| Charge Date | Merchant sends a pre-charge notice to the user on day t-2; charge can be made on day t |
| Charge Time | 07:10 – 21:50 |
| Charge Amount | Must match the amount specified in the pre-charge notice |
# 4.3 Pre-charge
| Verification Item | Business Rule |
|---|---|
| Charging Permission | User has a contract with Merchant and the contract is valid at the time of charge |
| Charge Date | “First” pre-charge notice: No date limit; “Non-first” pre-charge notice: Current date >= End of previous membership period - 3 days |
| Pre-charge Time | 07:10 – 21:50 |
| Charge Amount | Minimum 1 yuan, maximum equal to item price (not exceeding 5,000 yuan) |
# 5. Settlement Cycles
Currently, four types of membership subscription cycles are available:
| Payment Method | Membership Cycle | Settlement Cycle |
|---|---|---|
| Active Payment | / | T+3 |
| Weekly Membership | 7-day cycle | T+7 |
| Monthly Membership | 31-day cycle | T+31 |
| Quarterly Membership | 93-day cycle | T+31 |
| Annual Membership | 372-day cycle | T+31 |
# 6. Fee Structure
The standard fees and discount policies for subscription payments are as follows:
| Industry | First Subscription Fee Rate | Second and Subsequent Rates |
|---|---|---|
| Tools, Social Media | 1% (Discounted Rate) | 10% (Standard Rate) |
| Short Dramas, Novels | 10% | 10% |
Note: For industries like tools and social media, a discounted rate of 1% will apply for the first subscription payment in 2026. After that, the standard rate of 10% will be reinstated. Short dramas and novels are not eligible for the discount and will be charged at a uniform rate of 10%.
# 7. Eligibility Criteria
- Integrated with Mini Program virtual payment
- Mini Program has been released for at least 90 days
- Mini Program has completed authentication and record-filing
- Average daily active users (DAU) in the past 30 days >= 10,000
# II. Development Integration
# 1. Integration Process
| Step | Procedure | Integration Method | API Name |
|---|---|---|---|
| Initialization | Enable permission authorization | / | |
| Configure subscription items | MP Page | Virtual Payment - Basic Configuration - Item Configuration - Add Item | |
| Signing/Canceling | User signs up | API | wx.requestSubscribeSign |
| Notification of signing/cancellation results | API | xpay_subscribe_signing_result_notify | |
| Merchant cancels subscription | API | cancel_subscribe_contract | |
| Check subscription status | API | query_subscribe_contract | |
| Initiating Payment | Send pre-payment notification | API | send_subscribe_pre_payment |
| Initiate subscription payment | API | submit_subscribe_pay_order | |
| Notification of payment failure | API | Event type: xpay_subscribe_pay_fail_notify | |
| Notification of successful payment | API | Event type: xpay_goods_deliver_notify | |
| Query payment order | API | query_order | |
| Refund | Request refund | API | refund_order |
| Query refund status | API | query_order |
# 2. Application for Activation
Recipient: wx_virtualpayment@tencent.com
| Process | Integration Method | Preliminary Steps | Email Subject | Email Body | Email Notes |
|---|---|---|---|---|---|
| Enable Permission Authorization (Mini Program Dimension) | Confirmation of integration intent with Mini Program product team | Application for Mini Program Membership Subscription - Mini Program Nickname - Application Date | Mini Program Nickname: Mini Program AppID: Virtual Payment Merchant Number: Mini Program Entity: Mini Program Category: Business Model: Main Business, Mini Program Daily Active Users, Transaction Amount Application Purpose: Interaction with membership-related product pages: (activation, renewal, management processes. Images must be in jpg or png format, with file size not exceeding 2MB) | Notes: 1. Photographs are not allowed. 2> All interactions must be included in one image. 3. The customer service phone number must be displayed on the purchase record page, and the number must be verified. Verification Method Interaction Example: ![]() |
# 3. Configuring Subscription Items
Currently, you can go to Mini Program Backend > Virtual Payment > Basic Settings > Item Configuration > Development Version > Add Item. Select the membership subscription item for configuration.

After submitting the subscription item for review, it will take 1-3 days for approval. Once approved, you will receive a notification via Message Center. After approval, return to the item configuration page and click “Publish”.
Note: Membership subscription items cannot be edited or deleted. Currently, they can only be added individually; batch addition is not supported.
# 4. API Call
# 4.1 Payment Signature
Pseudo-code for the signature algorithm:
paySig = to_hex(hmac_sha256(appKey, uri + '&' + signData))
| Parameter | wx API | Server API |
|---|---|---|
| appKey | Can be viewed through Mini ProgramMP: Virtual Payment -> Basic Configuration -> Sandbox AppKey and Live AppKey in Basic Settings. Note: For subscription-based interface debugging, use the live environment with env = 0 and the live AppKey. | Same as above |
| signData | The signData field from the basic library | The post body of the API request |
| uri | For signed interfaces, use: requestSubscribeSign | Example: For https://api.weixin.qq.com/xpay/query_user_balance, uri = /xpay/query_user_balance |
# 4.2 User Subscription via wx.requestSubscribeSign
Note: The return value of this API cannot be used as a criterion for successful subscription. The actual subscription status should be confirmed through the subscription result notification or query.
| Field | Type | Description |
|---|---|---|
| signData | string | JSON string |
| paySig | string | Payment signature. For details, see Signature Details. URI: requestSubscribeSign |
| signature | string | User-state signature. For details, see Signature Details |
| success | function | Callback function for successful API call |
| fail | function | Callback function for failed API call |
| complete | function | Callback function for API call completion (called regardless of success or failure) |
Return Parameters
| Field | Type | Description |
|---|---|---|
| errcode | int | Error code |
| errmsg | string | Possible error messages include: "ERR_SUBSCRIBE_DEVICE_NOT_ALLOWED" (Subscription not available on Apple devices), "USER_DATA_ILLEGAL", "OPENID_ILLEGAL", "OPENID_NOT_MATCH", "SIGNATURE_INVALID", "EC_PAY_SIG_INVALID", "ERR_SUBSCRIBE_OUT_CONTRACT_CODE_ILLEGAL", "PRODUCT_ID_NOT_PUBLISH", "ERR_CODE_SUBSCRIBE_PRODUCT_NOT_BIND", "ERR_SUBSCRIBE_CONTRACT_CODE_REPEAT", and "EC_SYS" – System error, please contact developers for troubleshooting. |
# 4.3 Merchant Cancellation: cancel_subscribe_contract
For details, see Merchant Cancellation.
# 4.4 Query Subscription Relationship: query_subscribe_contract
For details, see Query Subscription Relationship.
# 4.5 Pre-notification of Deduction: send_subscribe_pre_payment
For details, see Pre-notification of Deduction.
# 4.6 Initiate Subscription Deduction: submit_subscribe_pay_order
For details, see Initiate Subscription Deduction.
# 4.7 Query Deduction Orders: query_order
For details, see Query Created Orders.
# 4.8 Apply for Refund: refund_order
For details, see Initiate Order Refund Task.
# 4.9 Notification of Subscription/Cancellation Results: xpay_subscribe_signing_result_notify
Note:
- It is recommended to use the
query_subscribe_contractinterface to verify order details as a backup. - Respond to this notification in the correct format.
Request Parameters
Basic Fields
| Field | Type | Remarks |
|---|---|---|
| ToUserName | String | Mini Program original ID |
| FromUserName | String | The openid of the message sender; in item delivery scenarios, it’s always the official WeChat openid |
| CreateTime | Number | Message sending time |
| MsgType | String | Message type, always set to: event |
| Event | String | Event type: xpay_subscribe_signing_result_notify |
Special Fields
| Field | Type | Remarks |
|---|---|---|
| Action | String | contract_notify (subscription notification) / cancel_contract_notify (cancellation notification) |
| UserOpenid | String | Openid at the time of subscription initiation |
| OpenorcloseTime | Number | Timestamp indicating the time of subscription/cancellation |
| ProductId | String | Item ID |
| OutContractCode | String | Merchant Contract agreement number |
| ContractWxAppid | String | Appid associated with the contract |
Response Parameters
| Field | Type | Remarks |
|---|---|---|
| ErrCode | Number | Sending status. 0: Success; otherwise: Failure |
| ErrMsg | String | (Optional) Error description for debugging purposes. Returned when ErrCode is not 0 |
Response format follows the message push documentation: Message Push | WeChat Official Documentation
XML Example:
<xml>
<ErrCode>0</ErrCode>
<ErrMsg>success</ErrMsg>
</xml>
# 4.10 Payment Failure Notification: xpay_subscribe_pay_fail_notify
Notes:
- It’s recommended to use the query_order API to check the order status. A status of 13 indicates a payment failure.
- Respond to this notification in the correct format.
Request Parameters
Basic Fields
| Field | Type | Remarks |
|---|---|---|
| ToUserName | String | Mini Program original ID |
| FromUserName | String | The openid of the message sender; in item delivery scenarios, it’s always the official WeChat openid |
| CreateTime | Number | Message sending time |
| MsgType | String | Message type, always set to: event |
| Event | String | Event type: xpay_subscribe_pay_fail_notify |
Special Fields
| Field | Type | Remarks |
|---|---|---|
| OpenId | String | User’s openid |
| OutTradeNo | String | Business order number |
| Env | Number | Environment configuration: 0 for live environment (official environment); 1 for sandbox environment |
| WeChatPayInfo | Object | WeChat Pay information; may be absent for non-WeChat Pay channels |
| GoodsInfo | Object | Item parameter information |
| ContractWxAppid | String | Contracted appid |
WeChatPayInfo Contents
| Field | Type | Remarks |
|---|---|---|
| MchOrderNo | String | WeChat Pay Merchant order number |
| TransactionId | String | Transaction ID (WeChat Pay order number) |
| PaidTime | Number | User payment time, in Unix timestamp format |
GoodsInfo Contents
| Field | Type | Remarks |
|---|---|---|
| ProductId | String | Item ID |
| Quantity | Number | Quantity |
| OrigPrice | Number | Original price of the item (in cents) |
| ActualPrice | Number | Actual payment price of the item (in cents) |
| Attach | String | Additional transmitted information |
| SubscribePeriodDays | Number | Subscription duration |
| Field | Type | Description |
|---|---|---|
| ErrCode | Number | Delivery status. 0: Successful |
| ErrMsg | String | (Optional) Error reason for debugging. Provided when ErrCode is not 0 |
Format reference: Message Pushing | WeChat Official Documentation
XML Example:
<xml>
<ErrCode>0</ErrCode>
<ErrMsg>success</ErrMsg>
</xml>
# 4.11 Payment Success Notification xpay_goods_deliver_notify
Request Parameters
| Field | Type | Description |
|---|---|---|
| ToUserName | String | Mini Program Original ID |
| FromUserName | String | The openid of the sender; in gift delivery scenarios, it’s always the official WeChat openid |
| CreateTime | Number | Message delivery time |
| MsgType | String | Message type, always set to “event” |
| Event | String | Event type: xpay_goods_deliver_notify |
| OpenId | String | User’s openid |
| OutTradeNo | String | Business order number |
| Env | Number | Environment configuration: 0: Live environment (also known as production); 1: Sandbox environment |
| WeChatPayInfo | Object | WeChat Pay information; may be absent for non-WeChat Pay payment methods |
| GoodsInfo | Object | Gift item details |
| TeamInfo | Object | Group buying information |
WeChatPayInfo Details:
| Field | Type | Description |
|---|---|---|
| MchOrderNo | String | WeChat Pay Merchant order number |
| TransactionId | String | Transaction ID (WeChat Pay order number) |
| PaidTime | Number | User payment time, represented as a Unix timestamp in seconds |
GoodsInfo Details:
| Field | Type | Description |
|---|---|---|
| ProductId | String | Item ID |
| Quantity | Number | Quantity of items purchased |
| OrigPrice | Number | Original price of the item (in cents) |
| ActualPrice | Number | Actual payment price of the item (in cents) |
| Attach | String | Additional information passed through |
TeamInfo content is as follows:
| Field | Type | Description |
|---|---|---|
| ActivityId | String | Activity ID |
| TeamId | String | Team ID |
| TeamType | Number | Team type: 1 - Full payment, 2 - Refund split |
| TeamAction | Number | 0 - Create team, 1 - Join team |
Return Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| ErrCode | Number | Yes | Status code of the request. 0: Successful, others: Failed |
| ErrMsg | String | No | Error message for debugging purposes. Provided when ErrCode is not 0 |
# III. Operational Guidelines
In response to relevant notices from the Ministry of Industry and Information Technology, to enhance users' awareness during the subscription process and ensure transaction security, protect user account rights, and maintain a healthy information consumption environment, WeChat Open Platform now enables the use of Mini Program automatic renewal subscription membership features, with the following operational guidelines:
# 1. Before User Subscription
When developers apply for the automatic renewal subscription membership feature, they must clearly state in the service details the original amount deducted per cycle after the discount ends. This information must be presented prominently and not in small print or in a vague manner, ensuring users are fully aware.
The automatic renewal subscription membership feature allows developers to customize the deduction amount, but it must not exceed the upper limit set by the authorized deduction template and must not be lower than the minimum limit specified by the platform.
To protect user rights, developers must deposit a transaction guarantee fee when applying for the automatic renewal subscription membership feature. This fee is managed according to the Mini Program Transaction Guarantee Fee Management Regulations.
When applying for the automatic renewal subscription membership feature, developers must provide the “Member Automatic Renewal Service Agreement” for platform review. The platform will assess whether there is any abuse of the feature or infringement of consumer rights. The feature will only be enabled after successful review.
a. The “Member Automatic Renewal Service Agreement” must clearly outline the content of the subscription service, the service period, the billing cycle, and other legally required information.
b. The agreement must also explain how to cancel the automatic renewal service. It should provide clear instructions for iOS and Android users on how to cancel their subscriptions on different payment platforms. These instructions should not be hidden in frequently asked questions or similar areas.
c. It is recommended that the agreement include terms regarding supplementary deductions. Since deductions may fail due to network issues, account problems, or insufficient balance on the deduction date, the platform will proceed with the deduction if the user has not cancelled the service. Once the deduction is successful, Mini Program will activate the next billing cycle for the service. However, since users are often unaware of the supplementary deduction process, this can lead to complaints. Therefore, it is advisable for developers to include clear terms about supplementary deductions in the service agreement, ensuring that users receive prominent warnings before signing the agreement.
# 2. During User Subscription
During the payment process, Mini Program should offer single-payment options for products and not force users to opt for automatic renewal.
When users subscribe to the automatic renewal membership, they should be clearly informed of the current subscription discount, future renewal costs, the subscription period, and the services included in the subscription.
When a user makes their first payment, prominently display the deduction date for the next billing cycle. Developers are advised to highlight or emphasize the next service cycle’s deduction date on pages related to membership products. Especially when a promotional strategy is applied to the initial membership price, the first service cycle often differs from regular cycles. Avoid using vague terms like “before expiration” or “next month,” and refrain from using small gray text. It’s better to clearly show the exact date of the first day of the next billing cycle, so that users can clearly understand the upcoming deduction time.
When a user initiates automatic renewal for a subscription membership, the “Membership Automatic Renewal Service Agreement” must be presented for the user to check off. This agreement should not be pre-selected by default. Highlight the agreement and strongly encourage users to manually select it. Developers should emphasize the terms of the agreement through bold formatting or by displaying a pop-up for confirmation. This helps reduce negative experiences and requests for cancellation due to users feeling pressured into signing without fully understanding the terms.
When displaying products available for automatic renewal subscription membership on the frontend, it’s important to clearly indicate the billing mode, such as weekly or monthly subscriptions.
# 3. After User Subscription
The marketing strategies offered to users must be confirmed at the time of subscription. Once confirmed, the Merchant cannot unilaterally change the agreed discounts or original prices after the subscription begins. Any changes to the service content must be announced 7 days in advance, and significant changes require reconfirmation from the user.
In accordance with legal requirements, users must be notified 5 days in advance of the automatic renewal deduction via effective means, including SMS, email, or push notifications. For better user experience, the platform provides a pre-deduction notification 2 days before the automatic renewal, ensuring that the stated deduction amount matches the actual amount charged.
Users should have access to customer service options such as WeChat customer service, online chat, or a 400-number, allowing them to directly contact the developer for assistance with usage issues.
If the developer encounters complaints or financial risks related to automatic renewal, or if the platform determines that there has been misuse or infringement of consumer rights, the platform may take corrective actions, including restricting the developer’s ability to release new versions, revoking the automatic renewal feature, limiting settlements and payments, or removing the product from the platform.
Developers must provide a clear and easy-to-use refund process for subscription memberships within the platform.
Upon receiving a complaint, developers must handle it and negotiate a refund within 24 hours. If a resolution isn’t reached within this time, the platform will intervene to handle the issue.
Developers should guide minors in their purchasing decisions to prevent impulsive or excessive spending. Refunds for transactions involving minors follow special procedures.
The platform must clearly outline how to cancel an automatic renewal subscription. Provide detailed instructions for iOS and Android users on how to cancel their subscriptions on various payment platforms. These instructions shouldn’t be limited to FAQ sections. On the Android version of WeChat, the cancellation process is as follows: Open WeChat, go to “Me”, then “Services”, “Wallet”, “Payment Settings”, “Automatic Renewal”, and disable the relevant automatic renewal.
