Create a payment session
payment.provider is SQUARE, tokenize with Square Web Payments and send the token to checkout.confirmPayment. If it is STRIPE, confirm its client secret with Stripe Elements.
Confirm a Stripe session with Stripe Elements
storefront.checkout.getOrderResult(locationId, cartId). Treat only completed as success; payment_pending and order_pending are retryable states, while failed is terminal.
Checkout Flow
See the complete checkout state machine.
Order Tracking
Poll the order result and load protected receipts.