For orders made by scanning the QR code to order, everyone can see the orders generated by the same table code, so any one of them can complete the payment/checkout.
So if someone here has available coupons or is a VIP member of a restaurant, it is recommended that you let him pay the bill and enjoy the discounted price.
The specific interface is:
["Front-end api interface document"](#)

# Parameter description
##orderId
This parameter is the ID of the current unpaid order record obtained using the dining table token;
The unsettled orders of the table can be seen by users who scan the QR code and share the same table code;
This parameter is generally a number with a length of 6-8 digits. Be careful not to distinguish it from the order number (generally more than 16 digits) and do not confuse it;
##calculate
This parameter is of type boolean. If true is passed in, it means a pre-purchase order. It only calculates the membership of the current purchaser + the coupons that can be used and the discount after using the coupons + the actual amount that needs to be paid after the full discount rule set by the system;
After obtaining the actual payment amount, you can complete the final payment/checkout by not passing this parameter or passing in false;
##couponId
The coupon ID used for this purchase can be passed into multiple coupons (if the background menu is set to allow the use of multiple coupons), the IDs of multiple coupons should be separated by English commas;
##token
The token of the user who paid this time. Please note that this token is no longer the token of the dining table.
# How to combine online payments
The above interface, by default, deducts fees from the current user's available balance. So, if the available balance is insufficient, how can online payment and ordering be completed in one step?
##① Calculate the amount to be paid online
Through the above interface, pass incalculate=trueGet the actual amount of the order that needs to be paid this time;
Read the current available balance through the interface for viewing user balance;
Based on the two, determine the amount that needs to be paid online this time;
##② Initiate online paymentThrough the online payment interface in the interface document, pass in the specified amount parameter to initiate online payment;
NextAction parameter of the payment interface, please pass:
```json
{
"type": 9,
"orderId": 1234,
"couponId": 9908
}
```
For details, please refer to:
["**nextAction parameter usage detailed explanation**"](https://www.yuque.com/apifm/doc/aetmlb)