Why did Shopify let two customers buy my last unit at the same time?
Two shoppers both "won" the same last unit at checkout. Here's what typically causes it and how to shrink the odds it happens again.
What's going on
You had exactly one unit left, two customers hit buy within seconds of each other, and somehow both orders came through as paid. Now you owe someone an apology, a refund, and possibly an awkward conversation if it was a gift or a hyped drop item.
This isn't a one-off glitch. Merchants describe it fairly regularly in Shopify's community forums, especially around limited drops, restocks, or low-stock items at a single location: two order timestamps a few minutes apart, both paid, inventory sitting at negative one. The common thread is that this is a timing issue in how checkout, payment, and inventory updates interact, not simply a merchant setting left in the wrong position, though a wrong setting is often part of it too.
Shopify does apply some protection against exactly this kind of collision during an active checkout, but that protection isn't absolute for every payment flow. The inventory count isn't fully locked down until a payment actually completes, so if two buyers reach checkout on the same unit close enough together, both can be let through, and whichever payment clears second still books as a legitimate paid order.
Why it happens
Shopify's inventory handling separates two moments: when a shopper starts checkout, and when payment actually clears and the inventory count is permanently reduced. Stock isn't locked the instant something is added to a cart, since that would let browsers who never buy tie up inventory that other real buyers want. That tradeoff is reasonable in general, but it means the strongest protection against a genuine two-buyer collision only applies during the narrow window of active checkout.
That window can be wider on external or offsite payment gateways than on Shopify's own payment options, because control of the transaction passes to a third-party page and the final inventory update waits for that page to report back. This isn't independently documented as a hard rule, but it lines up with what merchants on redirect-based gateways tend to report.
A large share of "oversold" cases also trace back to the inventory policy itself: "continue selling when out of stock" left on from an earlier pre-order period, or a multi-location setup where the location holding stock isn't the one actually fulfilling online orders, which can make a product look available, or unavailable, inconsistently.
5 ways to fix it
Turn off "Continue selling when out of stock" on every finite-stock variant
Open the product (or variant) in Shopify admin and check the Inventory section: make sure quantity tracking is on and "Continue selling when out of stock" is unchecked. With that box unchecked, checkout is supposed to stop new purchases once available quantity hits zero. This is the fix for the most common self-inflicted version of this problem: the box got left checked from a pre-order period and nobody flipped it back. It won't close every timing gap described below, but it removes the larger and more frequent cause, which is shoppers buying units that show zero available.
Check whether you're using an external or redirect-based payment gateway
Some merchants report this problem happens more often on external or offsite payment gateways than on Shopify Payments or Shop Pay. The theory is that when checkout hands the buyer off to a third-party payment page, Shopify can't finalize the inventory decrement until that buyer completes payment and returns, which widens the window for two people to both be let through on the same unit. This isn't something you can verify from a settings screen, and it's not a guaranteed cause, but if you're on a redirect-based gateway and this keeps happening, it's worth treating as a suspect alongside your inventory settings.
Build a small buffer into your listed quantity for hot items
For drops, restocks, or anything you expect several people to hit at once, list one or two fewer units than you actually hold, for example show 8 available when you have 10. The buffer stock still sells, either through a manual order edit or a quick top-up once the rush is over, but it absorbs the handful of near-simultaneous checkouts that would otherwise oversell your true last unit. It's a workaround rather than a fix, and it takes under a minute per listing.
Have a fast, low-drama process ready for when it still happens
Even with tracking on and the inventory policy set correctly, a genuine timing overlap at checkout can still let two orders through on the same unit. Check your inventory reporting in Shopify admin regularly, and before you fulfill anything, reconcile paid orders against what you actually have on hand. Have a standard response ready: refund one order right away, then message that customer with an apology and a backorder ETA, a substitute item, or a discount code for the trouble. Handling it within an hour of the order coming in keeps it from turning into a bad review.
For frequent high-demand drops, consider a queue or release-throttling app
If this keeps happening because you regularly sell out limited, hyped inventory within seconds, the underlying issue is a traffic-concentration problem, not a bug to patch: far more shoppers hit checkout in the same short window than you have units to sell. A waiting-room or queue app, or a checkout throttle that staggers access, addresses that pattern directly, while a general inventory-accuracy app won't. This is worth evaluating only if overselling is a recurring drop-day problem rather than an occasional fluke.
Bottom line
There's no single Shopify setting that makes overselling mathematically impossible. Even with inventory tracking on and "continue selling when out of stock" turned off, a genuine timing overlap during checkout can still let two orders clear on the same last unit. The highest-leverage free fix is getting your inventory policy right; after that, look at whether an external payment gateway might be widening the window, since that pattern shows up in some merchant reports even though it isn't a documented guarantee. A small stock buffer and a fast recovery process handle most of what's left. Only if you're running frequent high-traffic drops where this keeps recurring does it become worth evaluating a dedicated queueing or checkout-throttling app, since a general inventory app won't solve a traffic-concentration problem.
Browse the rest of the problem library, run a free storefront scan to catch issues like this automatically, or email us and we'll work out a custom solution for it.