It is generally used on PC web pages or desktop application software to generate a QR code, allowing users to scan the code using WeChat to complete payment.
```javascript
WXAPI.wxpayQrcode({
code: '',
token: '000',
money: 0.01,
remark: 'Preferential payment: 0.01',
payName: 'Preferential payment'
})
```
+ token login credentials
+ money payment amount
+ payName The purchase name displayed on the payment interface
+ remark remark information will be recorded in the remark field in the background payment record. It does not need to be passed.
+ nextAction After the payment is successful, the next operation that needs to be performed does not need to be passed.
+ shopId the payment store ID, optional
["Detailed explanation of nextAction parameter usage"](https://www.yuque.com/apifm/doc/aetmlb)
Return example:
```json
{
"code": 0,
"data": {
"timeStamp": "1639304269431",
"codeUrl": "weixin://wxpay/bizpayurl?pr=5NI0aeQzz",
"outTradeId": "ZF2112120676054987",
"appid": "wxb3218336ce0c0966",
"sign": "E47016270D1ED6680EEFD8B2B936BCFE",
"prepayId": "wx121817493635316ab631431e60dce00000",
"nonceStr": "FbKnk6KgD1RcTd74u7TiezlzVBs5gK"
},
"msg": "success"
}
```
After receiving the interface return, just generate the QR code from the content of `codeUrl`. After the user scans the code, the WeChat payment interface will pop up to complete the payment.
You can also send the content of `codeUrl` to the user's WeChat, and the user can also complete the payment by clicking this link.