Server-verified checkout — Stripe or Cash-on-Delivery
The backend prices and authorises every order; the browser is never trusted with money.
- 1The shopper opens checkout; saved addresses and any held coupons load, and the default address is auto-selected
- 2Choosing card lazily downloads Stripe.js and adds the config-driven service fee; choosing Cash-on-Delivery skips it entirely
- 3A coupon is applied from the shopper's rewards or typed in, and validated against the cart total by the backend
- 4For card, the backend returns a payment secret, Stripe Elements collects the card, and a confirm call finalises the order; for COD the backend creates the order directly
- 5The cart clears and an animated confirmation shows the order number and a what's-next timeline



