# Function description:
## Points Voucher
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;
Backend points coupons can be set:
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;
_After the user obtains the coupon code, he enters the coupon code on the mini program and redeems it into the user’s available points, and the user’s total points are accumulated_
## Sign in to get points
1. Encourage users to log in to the mini program every day and complete daily check-in tasks to receive points rewards;
2. Points can be used to redeem points-exclusive coupons, points to offset shopping, etc.;
3. The day after tomorrow, set the number of bonus points for signing in every day. If you sign in for x consecutive days, you can get y point rewards;
# Knowledge point review
In this example, the method used by the apifm plug-in can operate the user's points, so the parameter **token** (user login credentials) needs to be passed in multiple methods. The user can obtain the token after logging in, and then he can manage his own points.
Therefore, you need to understand the following chapters first:
["Using apifm plug-in for Flutter cloud development - user registration/login/forgot password/exit"](https://www.yuque.com/apifm/doc/rk525h)
#Backend configuration
## Open the developer backend for free
["Using apifm plug-in for Flutter cloud development - Installation"](https://www.yuque.com/apifm/doc/hggphs)
## Open the "Points Voucher" and "Points Module" modules
1. Log in to the "First Step" registration background, left menu --> Factory settings --> Module management
2. Find the "Points Voucher" and "Points Module" modules, click "Enable Module", then F5 to refresh the background interface
# apifm usage instructions
## Read order points deduction rules
```javascript
Apifm.scoreDeductionRules()
```
Use this method to read the points deduction rules set in the background.
## Read the points gift rules
```javascript
Apifm.scoreRules([Mapparams])
```
## Sign in to get points
### Sign-in rules
```javascript
Apifm.scoreSignRules()
```
Read the rules for signing in and sending points set in the background:
_How many points will be given for signing in once; y points will be given for signing in for x consecutive days; _
### Sign in
```javascript
Apifm.scoreSign(String token)
```
The currently logged in user signs in, and the token is the login credential returned after successful login by calling the login interface.
### Read today’s check-in information
```javascript
Apifm.scoreTodaySignedInfo(String token)
```
Determine whether you have signed in today
The error code returns 700, which means that you have not signed in; the error code that returns 0 means that you have signed in.
### Sign-in record
```javascript
Apifm.scoreSignLogs(Mapparams)
```
Read historical check-in records
## Use points coupons to redeem points
```javascript
Apifm.scoreExchange(String token, String number)
```
Use the coupon number of the points coupon to redeem points
## Points details
```javascript
Apifm.scoreLogs(Mapparams)
```
Every time a user's points change, the points details will be recorded in detail.
A good memory is not as good as a bad writing. Write a Flutter example yourself, import the apifm plug-in, and start writing a simple points creative app~
Looking forward to your work!