# Checkout and order placement Checkout finishes the cart's buying flow and produces an order. You can send the buyer to the cart's `checkoutUrl` or build a custom flow using Storefront operations. Both paths depend on the same configured commerce context. ## Before submitting Use the latest cart, including its lines, required contact and address data, shipping selection, and payment-session state. Show the returned amount the buyer is about to submit. Prevent duplicate final submissions in the interface. Payment initialization alone is not proof that payment succeeded. ## The order is the durable result A successful completion returns the order identity and its recorded commercial data. Use the order's own lines, addresses, discounts, taxes, and totals on the confirmation page. Do not reconstruct a historical purchase from the current catalog. Payment and fulfillment remain separate state dimensions after placement. ## When the response is lost A timeout does not prove that completion failed. Keep the same cart ID and reconcile its outcome before creating another purchase attempt. Calling completion for an already ordered cart returns its associated order. If the API reports a discrepancy, retain the cart ID for support rather than inventing a replacement order. Do not generalize this completion behavior to other mutations. A capture, refund, or new cart creation has its own repeat-operation contract. Follow [Build a cart and checkout](/guides/storefront/cart-and-checkout) for implementation and [Orders and order lifecycle](/concepts/orders/orders) for what happens next.