1, the target

Realize the function of automatic membership renewal in APP

2, process,

The core process of automatic membership renewal in the APP includes the following two steps:

2.1 Member automatic renewal authorization

The essence of automatic renewal is the entrusted debit mode. Only after the user completes the signing, the merchant can automatically deduct the money from the user’s account, so as to complete the payment operation of the membership order.

The user completes the withholding contract through the SDK of wechat or Alipay in the application, and wechat or Alipay notifies the merchant background of the signing information through asynchronous notification after the user successfully signs the contract. The merchant background needs to maintain the user’s signing information, and the signing ID is the core information, which is used to verify authorization in the order withholding request.

2.2 The renewal process will be initiated automatically after the membership expires

After detecting the user membership is about to expire, the system initiates the automatic renewal process of the user. You need to complete the order creation and order payment process (withholding), and finally delay the membership time for the user during the payment notification callback. The main difference between renewal orders and ordinary orders is whether to invoke the delegate withholding interface.

3, entrusted deduction authorization

The user entrustment deduction authorization is the premise of automatic renewal of membership. There are mainly two modes: signing in payment and signing only.

3.1 Contract in payment

Complete the withholding agreement at the same time of payment. You only need to add the signing information in the original order parameters to support the signing function, which seems very suitable for our automatic membership renewal scenario. The signing function will be completed after the user places an order to purchase the membership for consecutive months.

However, in the process of practice, there is a problem ignored. By default, the contract signing in payment is not opened, and users need to manually open the commission withholding. We hope to increase the proportion of users signing contracts, but the operation cost of requiring users to manually check this step is really too large, which does not meet our expectations.

3.2 only signing

In the pure signing mode, the merchant first invokes the pure signing interface on the front page to sign the withholding agreement with the user, and when the payment needs to be deducted, the application deduction interface can be invoked to automatically deduct the payment. After the user signs up, the merchant background will receive a callback notification.

4. Scheme design

The basic process of automatic membership renewal after adjustment is as follows:

4.1 Optimization of automatic renewal process

  • Use signing-only interface, not signing-in-payment interface

The sign-up interface only allows users to purchase continuous monthly goods only after signing up. In order to simulate the user signing and paying experience, the system initiates the automatic renewal process after the user signing successfully.

4.2 How to avoid the repeated renewal of membership after signing the contract

After optimizing the process, users need to initiate the automatic renewal process after signing up successfully. You need to make sure that you don’t renew the user repeatedly, and consider using the signing ID as an idempotent element of the order. The same signing ID will only initiate one automatic renewal.

4.3 How to avoid repeated renewal after membership expires

When the membership expires, an automatic renewal process is initiated. Consider using the membership expiration timestamp as an idempotent element of the order. If the membership renewal is successful, the membership expiration time stamp will be extended accordingly, and the logic of membership expiration will no longer be triggered. If a member fails to renew, the expiry time stamp of the member will remain unchanged and multiple renewal orders will not be issued.

5, summary

A different way of thinking about functionality implementation might make a difference. In this function, the signing-only interface can simulate the effect of user payment and signing, which meets our expectation. For the design of order services, see the previous article: Design Considerations for Order Services