Khi khách hàng thanh toán, tính năng Đặt hàng hoàn chỉnh sẽ hiển thị bộ chọn tiền boa. Thao tác này cho phép
khách hàng chọn số tiền boa để thêm vào đơn đặt hàng của họ.
Bạn có thể ẩn bộ chọn tiền boa cho dịch vụ nhà hàng bằng cách sử dụng ServingConfig.disableTipWidget trong nguồn cấp dữ liệu kho hàng.
Cách đặt số tiền boa mặc định
Bạn có thể đặt số tiền boa mặc định hoặc từ chối nhận tiền boa cho nhà hàng trong quy trình thanh toán. Các trường hợp sử dụng sau đây có thể được hỗ trợ trong CheckoutResponseMessage:
Nhà hàng yêu cầu một khoản tiền boa cố định
Trong ProposedOrder.otherItems trong CheckoutResponseMessage, hãy thêm một mục hàng thuộc loại GRATUITY với số tiền cố định bên trong.
Nhà hàng đề xuất tiền boa và cho phép khách hàng chỉnh sửa số tiền
Trong ProposedOrder.otherItems trong CheckoutResponseMessage, hãy thêm một mục hàng thuộc loại GRATUITY với số tiền cố định. Hãy nhớ thêm gratuityExtension với giá trị gratuityType là USER_MODIFIABLE.
[null,null,["Cập nhật lần gần đây nhất: 2024-11-26 UTC."],[[["Ordering End-to-End displays a tip selector during checkout, allowing customers to add gratuity to their order, which is sent within the `SubmitOrderRequestMessage`."],["Restaurants can hide the tip selector using the `ServingConfig.disableTipWidget` in their inventory data feeds."],["Restaurants can set a fixed gratuity amount or a suggested gratuity amount that users can modify through `CheckoutResponseMessage`."],["Restaurants can refuse gratuity altogether by including a `GRATUITY` line item with a blank amount in the `CheckoutResponseMessage`."]]],["During checkout, the Ordering End-to-End system displays a tip selector, allowing customers to choose a gratuity amount. This amount is sent as a `GRATUITY` `LineItem` in the `SubmitOrderRequestMessage`. The tip selector can be hidden using `ServingConfig.disableTipWidget`. Restaurants can set a fixed gratuity, suggest a modifiable gratuity using `USER_MODIFIABLE`, or disable gratuity by providing a blank amount in `ProposedOrder.otherItems` within `CheckoutResponseMessage`. These options are implemented with the type `GRATUITY` in the `LineItem`.\n"]]