```javascript
WXAPI.ttEcpay({
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": {
"order_token": "CgwIARDiDRibDiABKAESTgpMmwcFTRIzpnGNq2mDEvUtP5HpUFXtavtKor8ZEGxvjtrBEPMR0/9ssWaUOyNvyZJJ1Bfi2NhFn7i/Lb9qa2BGd7jX5K8gZCmYj+Z2IRoA",
"order_id": "7040989175306357029"
},
"msg": "success"
}
```
Use the mini program interface to activate WeChat payment:
["Official Documentation for Mini Programs"](https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/api/open-interface/pay/tt-pay)
```javascript
tt.pay({
orderInfo: {
order_id: "",
order_token: "",
},
service: 5,
success(res) {
if (res.code == 0) {
// Payment success processing logic, only when res.code=0, the payment is successful.
// But the final status is subject to the merchant's backend results.
}
},
fail(res) {
// Call up the checkout failure processing logic
},
});
```