```javascript
WXAPI.couponsHX({
token: 'Login token of the person under verification',
hxNumber: 'Verification code of coupon',
hx: false
})
```
+ hx Pass true for write-off; do not pass or pass false, just return coupon information without write-off
Interface return value:
```json
{
"code": 0,
"data": {
"dateAdd": "2024-08-01 21:01:49",
"dateEnd": "2024-08-31 21:01:47",
"dateStart": "2024-08-01 21:01:47",
"dateUpdate": "2024-08-01 21:02:43",
"dateUse": "2024-08-01 21:02:41",
"hxNumber": "0e7da31a-dbcf-4109-b690-2e2fd0b29602",
"id": 9463626,
"money": 5.23,
"moneyHreshold": 0,
"moneyType": 1,
"name": "Test Proportional Coupon",
"onlyFreight": false,
"pid": 8488,
"pwd": "112233",
"remark": " -> Write off user:1351478",
"shopId": 0,
"source": "User actively collects",
"status": 3,
"statusStr": "used",
"uid": 1351478
},
"msg": "success"
}
```
Instructions for use:
+ Read the coupon information interface under the user name to obtain the coupon cancellation code `hxNumber`
+ Generate the user's write-off code into a QR code or mini program code, and save the write-off code information in the code
+ For write-off personnel, directly scan WeChat (mini program code) or open the mini program and call WeChat's scan API to call camera recognition to read the write-off code.
+ After getting the write-off code, call the write-off interface above and display the data returned by the write-off interface to the write-off personnel.
If the SDK you are using is not the latest, you can manually add the following js method to the current sdk js file:
```javascript
couponsHX: data => {
return request('/discounts/hx', true, 'post', data)
},
```