Orchestrates a backend-less storefront checkout on top of
CartSessionClient, bundling the pieces every storefront otherwise
re-implements:
Cart as source of truth — selectedMethod and totals are read straight
off the cart; there is no shadow copy to drift.
One-call shipping select — selectMethod 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 handoff — createSession 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.
Orchestrates a backend-less storefront checkout on top of CartSessionClient, bundling the pieces every storefront otherwise re-implements:
selectedMethodandtotalsare read straight off the cart; there is no shadow copy to drift.selectMethodlocks the method and returns the cart with recomputed totals in a single round trip.status === 'recovering').createSessionreturns thecheckoutSessionIdfor<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.