Create and update a cart: Brief

Learn how to create and maintain a shopping cart.

Written By Anuj Rajput ()

Updated at April 6th, 2023

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.


Before you start building a cart, we recommend familiarizing yourself with the following API objects and their relationships: 

A diagram showing the cart object and its relationships

Was this article helpful?