@usethrottle/cart
    Preparing search index...

    Interface CartSessionCart

    The cart as the session (browser, opaque-token) surface returns it — CartSessionClient's methods. There is no workspaceId on this surface (the browser never needs, and shouldn't see, the internal workspace id); cartId — the same value as id — is always present, kept for backward compatibility with @usethrottle/cart's original (order-snapshot-shaped) cart-session response.

    interface CartSessionCart {
        applicationId: string;
        appliedDiscount?: AppliedDiscount | null;
        billingAddress: CartAddress | null;
        cartId: string;
        createdAt: string;
        currency: string;
        customerEmail: string | null;
        customerId: string | null;
        discountTotal: number;
        expiresAt: string | null;
        externalRef?: {
            connectionId: string;
            externalCartId: string;
            externalMetadata: Record<string, unknown>;
        };
        id: string;
        lineItems?: LineItem[];
        metadata: Record<string, unknown>;
        netN: number | null;
        notes: string | null;
        selectedShipping?: SelectedShipping | null;
        shippingAddress: CartAddress | null;
        shippingTotal: number;
        status: "open" | "checkout" | "converted" | "abandoned";
        subtotal: number;
        taxLines?: TaxLine[];
        taxTotal: number;
        total: number;
        unitCount: number;
        updatedAt: string;
    }

    Hierarchy

    • Omit<Cart, "workspaceId">
      • CartSessionCart
    Index
    applicationId: string
    appliedDiscount?: AppliedDiscount | null
    billingAddress: CartAddress | null
    cartId: string
    createdAt: string
    currency: string
    customerEmail: string | null

    Lightweight captured email (no full customer record), or null.

    customerId: string | null
    discountTotal: number
    expiresAt: string | null
    externalRef?: {
        connectionId: string;
        externalCartId: string;
        externalMetadata: Record<string, unknown>;
    }
    id: string

    getById/create/etc. (the carts resource) return this shape. See CartSessionCart for the browser-facing CartSessionClient shape, which omits workspaceId and adds cartId.

    lineItems?: LineItem[]
    metadata: Record<string, unknown>
    netN: number | null
    notes: string | null
    selectedShipping?: SelectedShipping | null
    shippingAddress: CartAddress | null
    shippingTotal: number
    status: "open" | "checkout" | "converted" | "abandoned"
    subtotal: number
    taxLines?: TaxLine[]
    taxTotal: number
    total: number
    unitCount: number

    Sum of the line-item quantities — 1 stand + 2 notebooks + 1 keyboard is 4, not 3. Present only on this surface; the merchant carts resource does not return it. Named for what it counts because itemCount in the cart.abandoned webhook payload means the number of distinct lines.

    updatedAt: string