Commerce Cart API

lightning/commerceCartApi

Create and delete carts for buyers in a webstore using the lightning/commerceCartApi module. The lightning/commerceCartApi module requires API version 62.0 or later.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App

::::::tabset{tabs='[ "Develop", "Specifications" ]'}

:::::tab The lightning/commerceCartApi module includes methods to create and delete carts for buyers in a webstore.

To use the Commerce Cart API in your component, import the functions in your component's JavaScript file.

import { createCart, deleteCart } from "lightning/commerceCartApi";

For this module's specification and examples, see the Lightning Web Components Developer Guide.

:::::

:::::tab ::component-specification{component="commerceCartApi" model="lwc" namespace="lightning"}

:::::

::::::