There are three ways to configure your shoppers' checkout flow:

Here's a description of each:
- ⭐ Recommended approach . In this flow:
- You create a cart by adding items to the Locally cart (
POST /cart/items/add
) as your shoppers add items to their cart on your site. This ensures that your shopper stays in sync with the store's own prices and verified sales tax estimates which can be used in your own UI. - When the shopper is ready to checkout you can make any final adjustments to the item quantities (
POST /cart
), including removing any items that have been dropped from the cart on your site. - Using
POST /cart/order
you submit a tokenized credit card along with required shopper details. The card will be authorized for payment and the purchase request will be submitted to the local shop for fulfillment!
Learn more about this flow
- You create a cart by adding items to the Locally cart (
- This is similar to the approach in #1. However, you may have a use-case which requires you to ensure that all of the items in both the Locally cart and your own cart are fully authorized for payment before you inform your shopper that the order was successful. In this flow:
- When the shopper has submitted their payment information you will use
POST /cart/auth
to first authorize payment for all of the items in the Locally cart. - Finally, when you're ready to commit the order to the local shop, you'll call
POST /cart/commit
.
Learn more about this flow
- When the shopper has submitted their payment information you will use
- This approach allows you to submit an entire order for processing in a single request.
- Your request will include the shoppers form of payment, all of the cart item details, and any sales tax overrides, to
POST/cart/validate
. Locally will validate all of the details and then authorize the shopper's card for payment. If there are any problems with any aspect of the request or payment authorization, the request will fail and send detailed error messaging. - When you're ready to commit the order to the local shop, you'll call
POST/cart/commit
.
Learn more about this flow
- Your request will include the shoppers form of payment, all of the cart item details, and any sales tax overrides, to