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

# Cart Types

> TypeScript interfaces for cart and checkout

## ShopifyCart

```typescript theme={null}
interface ShopifyCart {
    id: string
    checkoutUrl: string
    totalQuantity: number
    cost: {
        totalAmount: ShopifyMoney
        subtotalAmount: ShopifyMoney
        totalTaxAmount: ShopifyMoney | null
    }
    lines: {
        edges: Array<{
            node: ShopifyCartLine
            cursor: string
        }>
        pageInfo: ShopifyPageInfo
    }
}
```

***

## ShopifyCartLine

```typescript theme={null}
interface ShopifyCartLine {
    id: string
    quantity: number
    merchandise: ShopifyCartLineMerchandise
    cost: {
        totalAmount: ShopifyMoney
        amountPerQuantity: ShopifyMoney
    }
    sellingPlanAllocation: ShopifySellingPlanAllocation | null
}
```

***

## ShopifyCartLineMerchandise

```typescript theme={null}
interface ShopifyCartLineMerchandise {
    id: string
    title: string
    product: {
        title: string
        handle: string
    }
    image: ShopifyImage | null
    price: ShopifyMoney
    selectedOptions: Array<{
        name: string
        value: string
    }>
}
```

***

## CartLineInput

Input for adding items to cart.

```typescript theme={null}
interface CartLineInput {
    merchandiseId: string
    quantity: number
    sellingPlanId?: string
}
```

***

## CartLineUpdateInput

Input for updating cart items.

```typescript theme={null}
interface CartLineUpdateInput {
    id: string
    quantity: number
}
```

***

## CartSubscriber

Callback function for cart subscriptions.

```typescript theme={null}
type CartSubscriber = (cart: ShopifyCart | null) => void
```

***

## ShopifySellingPlanAllocation

Present on cart lines when a selling plan is applied. Contains pricing details for pre-orders and subscriptions.

```typescript theme={null}
interface ShopifySellingPlanAllocation {
    sellingPlan: ShopifySellingPlan
    checkoutChargeAmount: ShopifyMoney
    remainingBalanceChargeAmount: ShopifyMoney
}
```

***

## ShopifySellingPlan

The selling plan details attached to a cart line.

```typescript theme={null}
interface ShopifySellingPlan {
    id: string
    name: string
    description: string | null
}
```
