@usethrottle/checkout-react
    Preparing search index...

    Interface UseThrottleCheckoutResult

    interface UseThrottleCheckoutResult {
        addItem: (input: AddLineItemInput) => Promise<void>;
        applyDiscount: (code: string) => Promise<void>;
        cart: any;
        cartSessionId: string | null;
        clearShipping: () => Promise<void>;
        createSession: (input: CheckoutHandoffInput) => Promise<CheckoutHandoff>;
        error: Error | null;
        refresh: () => Promise<void>;
        removeDiscount: () => Promise<void>;
        removeItem: (itemId: string) => Promise<void>;
        reset: () => void;
        selectedMethod: any;
        selectMethod: (input: SelectShippingInput) => Promise<void>;
        status: ThrottleCheckoutStatus;
        totals: CheckoutTotals | null;
        updateItem: (itemId: string, input: UpdateLineItemInput) => Promise<void>;
    }
    Index
    addItem: (input: AddLineItemInput) => Promise<void>
    applyDiscount: (code: string) => Promise<void>
    cart: any

    Current cart snapshot, or null before the first item / resume.

    cartSessionId: string | null

    Current cart session id, or null before the first item.

    clearShipping: () => Promise<void>
    createSession: (input: CheckoutHandoffInput) => Promise<CheckoutHandoff>

    Hand off to checkout. Returns the hand-off — use checkoutSessionId with <PaymentEmbed sessionId={…}> (or redirect the buyer to checkoutUrl).

    error: Error | null

    Last error, or null.

    refresh: () => Promise<void>

    Re-fetch the current cart.

    removeDiscount: () => Promise<void>
    removeItem: (itemId: string) => Promise<void>
    reset: () => void

    Forget the current session (a new cart is created on the next item).

    selectedMethod: any

    The selected shipping method, bound to the cart (never a shadow copy).

    selectMethod: (input: SelectShippingInput) => Promise<void>

    Lock a shipping method. One call — the returned cart carries recomputed totals.

    Coarse lifecycle status — drive your UI off this rather than cart === null.

    totals: CheckoutTotals | null

    Live totals, bound to the cart. Null before a cart exists.

    updateItem: (itemId: string, input: UpdateLineItemInput) => Promise<void>