# Preface
This tutorial is based on the "apifm-wxapi" module and teaches you how to quickly implement small program development, so you may need to understand the following knowledge points first:
["Creating HelloWorld Project"](https://www.yuque.com/apifm/doc/hezlrm)
["Use "apifm-wxapi" to quickly develop small programs"](https://www.yuque.com/apifm/doc/mdldsd)
["Register for free to open the backend and obtain an exclusive domain name"](https://www.yuque.com/apifm/doc/qr6l4m)
In this case, some functions require the user to log in before they can be operated, which means token authorization is required. Please understand first:
["WeChat Mini Program login to obtain openid and third-party tokens"](https://www.yuque.com/apifm/doc/kaygbw)
# Function introduction
Generate point coupons in batches in the background (each point coupon has its own independent coupon number);
You can according to your needs:
1. Make a physical VIP points card, similar to the current supermarket card, scratch off the coating and check the coupon number;
2. Print paper coupons and points coupons with the coupon number printed on them;
3. Use the automatic delivery function of the card number to issue it to the user;
4. Issue coupon codes to users through other channels;
After the user obtains the coupon code, he or she enters the coupon code on the mini program and converts it into the user’s available points. The user’s total points are accumulated.
# enable module
Log in to the "First Step" registration background, left menu --> Factory settings --> Module management
Find and enable the following modules, then press F5 to refresh the background interface. You will be able to see all the function menus required for this case:
**Points Voucher**
# Generate coupons in batches

1. You can specify how many points coupons to generate in batches, and the system will randomly generate points coupon codes;
2. The validity period of the points coupon can be set, and the system will automatically expire;
3. Fixed numerical points and randomly generated points can be set;
# apifm-wxapi method description
```javascript
WXAPI.scoreExchange(token, number)
```
_More usage methods about apifm-wxapi: _
["apifm-wxapi Instructions for Use"](https://github.com/gooking/apifm-wxapi/blob/master/instructions.md)
_Download the Demo code of this case: _
["apifm-wxapi using Demo program"](https://github.com/gooking/apifm-wxapi-demo)
Looking forward to your progress!
grateful!