A cart contains the merchandise that a customer intends to purchase, and the estimated cost associated with the cart. You can use the Storefront API to interact with a cart during a customer's session.
This guide shows how to create a cart and retrieve it, update cart line items and customer information, and retrieve a checkout URL.
- You've completed the Getting started with the Storefront API guide.
- You've created products and product variants in your store.
- You're using version 2022-10 or higher of the Storefront API. To set metafields on a cart, you need to use the unstable version of the Storefront API.
- If you're using the checkout workflow to manage a cart and want to adopt the cart workflow instead, then you need to manually migrate your app.
Before you start building a cart, we recommend familiarizing yourself with the following API objects and their relationships: