Checkout ​
Recipes for the cart and checkout flows, from the first line item to a placed order and its payment.
Cart
Understand why every cart write returns the whole recalculated cart, the shared cart state behind useCart, the line item operations, and the errors map a 2xx response can carry.
Cart Errors
Understand why a 2xx cart response can still carry errors, where they are collected, why reading them clears them, and how one message key is treated as a success.
Checkout and Order Placement
Understand why the shipping and payment method lists are recalculated on every change, how a method selection is a context patch, what the order request actually carries, and why the cart is gone afterwards.
Payment
Understand why payment starts after the order exists, what the handle-payment response does and does not tell you, how the return page reads the transaction state, and when the method can still be changed.