> ## Documentation Index
> Fetch the complete documentation index at: https://developers.firmly.ai/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>
  <ParamField header="x-firmly-authorization" type="string" required>
    Device authentication token from browser session
  </ParamField>
</Card>

## Path Parameters

<ParamField path="domain" type="string" required>
  Merchant domain (e.g., `staging.luma.gift`)
</ParamField>

## Response

Returns an empty shopping cart.

### Response Fields

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

<RequestExample>
  ```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()
  ```
</RequestExample>

<ResponseExample>
  ```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"
      }
    ]
  }
  ```
</ResponseExample>

## Error Responses

### 400 Bad Request

Missing or invalid authentication header

### 404 Not Found

Cart not found
