E-commerce

What happens if a customer closes the tab after paying?

On a correctly built store, nothing bad — the payment provider webhook creates the order regardless of the browser. On a store that creates orders on the success-page redirect, that customer has been charged and has no order, and you find out when they complain.

Answered by Anas Bin Masud 166 words 3 sections

The correct order of operations

  1. Create a pending order row, then send the customer to the payment page
  2. Customer pays
  3. The provider POSTs a webhook to your server
  4. Verify the signature, find the pending order, mark it paid
  5. Fulfil: provision, email, decrement stock
  6. The browser redirect only ever DISPLAYS state — it never creates it

Why this is so common

Because it works perfectly in testing. Nobody closes the tab during a test purchase, so the redirect-driven flow ships and the bug appears on the first genuinely busy day.

The question to ask a supplier

Ask them this exact question before hiring. Someone who has shipped real checkouts answers immediately and specifically. Someone who has not says something reassuring and vague.

The longer version

This answer is deliberately short. If you want the full treatment, Stripe checkout integration, and the four failure modes nobody tests for covers it in about 3 minutes — free, ungated, written from client work.

Who answered this

Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan — fifteen live client sites, six of them stores taking real payments. These answers come from those projects rather than from a content brief. More about how I work, or ask me something directly.

People also ask

All 110 answers →

Still have a question this did not answer?

Send the brief and you get a reply within one business day — either questions, or a scoping call. If your project is not something I should take on, I will say so then.

Response
Replies within 1 business day
Hours
Mon–Fri, 09:00–18:00 PKT — overlaps 05:00–14:00 UK, 00:00–09:00 US Eastern
Booking
Booking projects from October 2026
WhatsApp — opens a chat with +92 346 5348466 in a new tab