Cart
Explore what information is available for carts.
This type includes properties that describe its current state, including the total cost, purchase stage, and product details.
Properties
These are the available properties:
- stage
The current stage of the shopping process. For example, "browsing" or "checkout."
- items
The list of items in the cart in the order they were added.
- currency(optional)
The currency in which the monetary values are expressed in the shopping cart.
We recommend using the ISO 4217 3-letter code for the currency, but the identifier format is up to the implementation and can be a code, a name, or any other identifier.
- shippingPrice(optional)
The total shipping price for the items in the shopping cart, including any handling fees. If not specified, it indicates that the shipping price is not yet calculated.
- coupon(optional)
The coupon code applied to the purchase for a discount. For example, "SUMMER20".
- discount(optional)
The total discount applied to the purchase, as an absolute value. For example, 20.00 for a $20 discount.
- costs
The additional costs associated with the purchase as a map of key-value pairs. The key is the name of the cost, and the value is the amount of the cost.
- taxes
The tax amount added to the purchase as a map of key-value pairs. The key is the tax name, and the value is the tax amount.
- subtotal(optional)
The total cost of the items before any additional charges or discounts are applied. If not specified, it indicates that the subtotal is not yet calculated.
- total
The total revenue or grand total associated with the transaction. It includes shipping, tax, and any other adjustment. If the cart is empty, the total is $0.
- lastUpdate
The time when the cart was last updated. Updates refer to any interaction with the shopping cart, such as adding or removing items, changing quantities, or applying discounts.
If the cart is empty, the last update is always the current time.
Cart stage
These are the possible values and what they represent:
Stage | Description |
---|---|
browsing | The user is browsing the store, but the cart is still empty. |
shopping | The user has added items to the cart. |
checkout | The user has started the checkout process. |