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

# Clear Cart

> Removes all items from the shopping cart

## Overview

Removes all items from the cart, returning an empty cart.

## Authentication

> [card]
>
> **x-firmly-authorization** `string` *required*
>
> Device authentication token from browser session

## Path Parameters

**domain** `string` *required*

Merchant domain (e.g., `staging.luma.gift`)

## Response

Returns an empty shopping cart.

### Response Fields

Same as [Get Cart](https://firmly.mintlify.site/api-reference/simple-cart-api/cart/get-cart.md#response-fields) response, but with an empty `line_items` array.

```bash cURL theme={null}
curl --request DELETE \
  --url https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items \
  --header 'x-firmly-authorization: YOUR_TOKEN'
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items', {
  method: 'DELETE',
  headers: {
    'x-firmly-authorization': 'YOUR_TOKEN'
  }
});

const cart = await response.json();
```

```python Python theme={null}
import requests

response = requests.delete(
    'https://api.firmly.work/api/v1/domains/staging.luma.gift/cart/line-items',
    headers={
        'x-firmly-authorization': 'YOUR_TOKEN'
    }
)

cart = response.json()
```

```json Success Response theme={null}
{
  "cart_id": "1e43868c-d4a5-418c-bd6b-5fff043550d2",
  "platform_id": "example",
  "shop_id": "staging.luma.gift",
  "display_name": "Luma Store",
  "line_items": [],
  "sub_total": {
    "currency": "USD",
    "value": 0,
    "symbol": "$",
    "number": 0
  },
  "shipping_total": {
    "currency": "USD",
    "value": 0,
    "symbol": "$",
    "number": 0
  },
  "tax": {
    "currency": "USD",
    "value": 0,
    "symbol": "$",
    "number": 0
  },
  "total": {
    "currency": "USD",
    "value": 0,
    "symbol": "$",
    "number": 0
  },
  "payment_method_options": [
    {
      "type": "CreditCard",
      "wallet": "user"
    }
  ]
}
```

## Error Responses

### 400 Bad Request

Missing or invalid authentication header

### 404 Not Found

Cart not found


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