Sample — not a live investigation
How does the checkout page validate coupon codes?
https://shop.example.test (fictional)
When a coupon is entered, where is it validated and what feedback is shown?
Evidence
observedNetwork request
POST /api/coupons/validate on blur of the coupon field
Request body: {"code":"<input>","cartId":"<id>"}
Response 200: {"valid":false,"reason":"expired"}observedBundle code
Client handler debounces input by 400ms
chunk-checkout.js · function applyCoupon(e){clearTimeout(t);t=setTimeout(()=>validate(e.target.value),400)}inferredInference
Discount math is computed server-side
The client renders the returned total; no discount arithmetic appears in the shipped bundle.
uncertainUnknown
Rate limiting behaviour not observable
Private backend code is not visible from the browser. Limits cannot be confirmed.
Implementation spec (original)
- Debounced client validation request (300–500ms)
- Server endpoint returns { valid, reason, discount }
- Inline error states for expired / invalid / minimum not met
- Totals re-rendered from server response only