Decision 0009 Accepted
- Owner
- justin
- Reviewed
- 2026-10-09
Context
Checkout takes stock (0004 Take stock at checkout, not when items go in the cart), and an order that is never paid keeps it. Shoppers abandon the payment step often: a card is declined, a bank's confirmation page times out, a tab is closed. Stripe leaves those PaymentIntents open indefinitely.
Decision
Orders still pending_payment 30 minutes after checkout are cancelled by a cron trigger on storefront-api that runs every five minutes. The PaymentIntent is cancelled at Stripe first, and an order whose intent can no longer be cancelled is left for the webhook (The payment webhook).
Consequences
- Stock held by an abandoned checkout comes back within 35 minutes.
- A shopper who comes back after the window has to check out again; the old client secret no longer works because the intent is cancelled.
- Bank redirects and 3D Secure fit comfortably in 30 minutes. Delayed payment methods (bank debits, which take days) would not. They are off in the Stripe dashboard, and turning one on needs a different rule.