E-commerce storefronts combine public catalog browsing with authenticated customer accounts, promotional engines, payment redirects, and fulfillment webhooks. Because checkout spans multiple client and server steps, business-logic flaws in cart and order transitions can cause direct revenue loss or expose customer shipping and invoice records.
Four checkout and order-management flaws to test
While automated scanners check for missing headers, cookie attributes, and injection indicators, a complete e-commerce security assessment also tests the business rules governing carts, discounts, and order ownership:
- Order and invoice BOLA/IDOR: checking whether Shopper A (or an unauthenticated guest lookup) can view Shopper B's order confirmation, home address, or downloadable PDF invoice by changing an order ID or phone parameter.
- Cart price and shipping-tier tampering: intercepting `POST /api/cart` or checkout requests to verify that unit prices, tax rates, and shipping fees are looked up on the server rather than accepted from client JSON.
- Coupon stacking and single-use bypass: testing whether single-use promo codes, referral credits, or gift vouchers can be applied multiple times across parallel requests or combined beyond promotion rules.
- Cart modifications after payment initiation: adding items to a cart in one tab after a payment session is created in another tab to test whether the final webhook reconciles the paid amount against the fulfilled items.
Hardening the checkout state machine
Model checkout as a strict server-side state machine. Freeze or hash the cart line items and total when creating the payment intent, verify at webhook settlement that the paid currency and amount match the locked order total exactly, expire unpaid inventory holds on a predictable schedule, and enforce object-level ownership checks on every order status and invoice download route.
Lock cart items and server-calculated totals before generating a payment session, and verify paid amount and currency match before marking an order fulfilled.