Recipes
🦉
Checkout
Open Recipe

The first step in The Checkout Process is doing a price check to reconcile the menu items and their prices, given any modifiers or promotional codes, that the front end is sending against what the back-end expects before Handling Payment Information.

The payload expected will need to include fulfillment method, any applied promotional codes so the back-end can verify that they are valid and apply them, the ID of the Table that the checkout will be completed at, and a cart object. The cart object is a dict with the keys being Line Item IDs and the values being the Modifiers and resulting prices. This is also checked against what is expected by Bbot and any associated fees or discounts are applied.

The endpoint returns a CartPrice Object. This object has a list of additional fees that should be applied to the order, a list showing which of the promotional codes were valid, and a dictionary of PriceCheck Objects. This is a dictionary where the keys are Line Item IDs and the values are the Price Check results: an object containing discounts applied to the cart, price of the line item in cents before tax, and the tax that was applied to each line item.

Once this Price Check has been completed, the front-end application can move on to Handling Payment Information. Given the weight and importance of running the Price Check, we recommend you run it every time a user adds a new item to the cart. This cuts down on time spent running the Price Check during the checkout flow.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!