Introduction

Note: This module is universal. Functions in this module can run on both the backend and frontend.

The eCommerce Cart API provides functionality for creating and managing carts, as well as for creating a checkout based on an existing cart. The cart is the first phase of an eCommerce purchase flow, followed by checkout, then order. A cart holds information about items for purchase, prices, discounts, site details, and more.

A cart can be created either by using the createCart() function, or by adding an item to the cart.

Estimate the cart's totals (including shipping costs) using the estimateTotals() function.

Before you begin

To assist in moving from the Stores Cart API to the eCommerce Cart API, refer to the Cart Conversion Table.

To use the Wix eCommerce Cart API, import { cart } from the wix-ecom-backend module:

Copy
1
Was this helpful?
Yes
No