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

    Function useThrottleCheckout

    • Orchestrates a backend-less storefront checkout on top of CartSessionClient, bundling the pieces every storefront otherwise re-implements:

      • Cart as source of truthselectedMethod and totals are read straight off the cart; there is no shadow copy to drift.
      • One-call shipping selectselectMethod locks the method and returns the cart with recomputed totals in a single round trip.
      • Stale-cart recovery — a CartNotOpenError (cart converted by a completed order, or abandoned) transparently rebuilds a fresh session from the last-known line items + shipping and retries (status === 'recovering').
      • Session handoffcreateSession returns the checkoutSessionId for <PaymentEmbed>.

      Address collection is handled inside the checkout embed (the hosted/full checkout collects shipping/billing), so this hook intentionally does not write addresses to the cart.

      const { addItem, selectMethod, totals, createSession, status } =
      useThrottleCheckout({ applicationId, environmentId, quoteToken });

      Parameters

      Returns UseThrottleCheckoutResult