Key Features Covered:

  • Explicit Cart Creation: Carts must be created before items can be added.
  • Persistent Carts: Carts are tied to the user’s token/account.
  • Item Management: Add, update quantity, or remove products and variants to an existing cart.
  • Pricing Calculation: Automatically calculates subtotals, taxes, shipping, and grand totals.
  • Discount Application: Apply coupon codes, automatic promotions, loyalty points, and store credit.
  • Address Management: Set billing and shipping addresses for checkout calculation.
  • User Association: Carts link to anonymous or logged-in users; retrievable via user_id for both.

Core Concepts

Cart API Endpoints

Common Use Cases & Flows