> ## Documentation Index
> Fetch the complete documentation index at: https://crossword.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cart and checkout card

> The cart and checkout card shows the shopper's basket and totals inside the chat. Shoppers change quantities, remove items, and head to checkout from it.

The cart and checkout card shows the shopper what is in their basket and lets them change it or check out from inside the conversation. As a cart card it focuses on items and quantities. As a checkout card it focuses on the summary and the controls that lead to payment. Either way, the shopper finishes without leaving the chat.

![The cart card with one item, a quantity of two, and three items](https://mintcdn.com/crossword/1ix7eW-R8_36LH_u/images/cards/cart-checkout-card.png?fit=max\&auto=format\&n=1ix7eW-R8_36LH_u\&q=85\&s=dfc873e0688589a3aa59bffcbeed8335)

The cart card with one item, a quantity of two, and three items

## Anatomy

The diagram shows the cart and checkout card as its items, totals, modifications, recommendations, and controls, and the two modes it can take.

```mermaid theme={null}
flowchart TB
  CARD["Cart and checkout card<br/><small>no rule</small>"]
  CARD --> MODE
  CARD --> ITEMS
  CARD --> TOT
  CARD --> MOD["Modifications<br/><small>change a quantity or remove an item</small>"]
  CARD --> RECS["Recommendations<br/><small>optional add-ons</small>"]
  CARD --> CTRL["Cart or checkout controls<br/><small>only what your storefront permits, such as Proceed to checkout</small>"]
  subgraph MODE["Mode"]
    CM["Cart card<br/><small>items and quantities</small>"]
    CK["Checkout card<br/><small>summary and the controls that lead to payment</small>"]
  end
  subgraph ITEMS["Items and quantities"]
    IT["Item<br/><small>product, variant, image</small>"]
    IT --> QTY["Quantity"]
    IT --> LP["Line price"]
  end
  subgraph TOT["Pricing and totals"]
    SUB["Subtotal"]
    DISC["Discounts"]
    TOTAL["Total"]
  end
  STORE["Storefront cart<br/><small>live</small>"]
  CARD -. "reads and updates" .-> STORE
  PC["Product cards"]
  RECS -. "shown as" .-> PC
```

| Property | What it holds |
| - | - |
| Items and quantities | Each product in the cart with its variant, image, and quantity. |
| Pricing and totals | Line prices, subtotal, discounts, and the total. |
| Modifications | Controls to change a quantity or remove an item. |
| Recommendations | Optional products suggested alongside the cart, such as an add-on for an item already in it, shown as [product cards](https://crossword.ai/docs/components/cards/product-card.md). |
| Cart or checkout controls | The buttons the shopper can use, such as **Proceed to checkout**. Only the controls your storefront permits are shown. |

The card reads the live cart from your storefront. When the shopper changes a quantity on the card, the storefront cart changes with it.

## Where it appears

A cart and checkout card never shows on its own. One of these components includes it.

* In the [welcome message](https://crossword.ai/docs/components/conversation/welcome-message.md), which is global. Every shopper sees the same one on every page, including shoppers with an empty cart, so for a returning shopper with items still in their cart, use a proactive message instead.
* In a [proactive message](https://crossword.ai/docs/components/conversation/proactive-message.md), for example a cart recovery message that shows the items left behind. A cart recovery Campaign sends one at each step of its sequence.
* In the [assistant reply](https://crossword.ai/docs/components/conversation/assistant-reply.md), where the Agent chooses it. The shopper asks what is in their cart, asks to remove something, or asks to check out, and the Agent answers with the card.
* On a page, inside a [page section](https://crossword.ai/docs/components/dynamic/overview.md) on the cart page, for example a [content block](https://crossword.ai/docs/components/dynamic/overview.md) that shows the basket beside the discount that applies to it.

## Rules

A cart and checkout card carries no rule. It shows because the welcome message, or a proactive message or page section with a rule, included it, or because the Agent composed it into the assistant reply. The rule that decides whether and when the shopper sees it lives on that component, not on the card. The welcome message is the exception: it carries no rule and is global, so every shopper sees what it embeds. Read [Rules](https://crossword.ai/docs/orchestration/rules.md).

## Example

The card that confirms an add to cart, shown in three states.

```yaml theme={null}
Header: A check with "Added to your cart"
Line items: Thumbnail, title, size, quantity when more than one, and price
Total: Cart total with the item count
```

With one pair, the card shows that item and a total of one. When the shopper adds a second of the same pair, the line shows the quantity and the total counts both. With several products, each gets its own line and the total adds them up. The card reads the live storefront cart, so the cart page matches it on refresh.

## Related

> [card] [Product card](https://crossword.ai/docs/components/cards/product-card.md)

> [card] [Order and refund status card](https://crossword.ai/docs/components/cards/order-refund-card.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.