Skip to content
MyStoreKit
Fraud prevention

How to set purchase quantity limits on Shopify: stopping resellers and bulk orders at checkout

Stores that sell limited or popular items know the pattern: the moment a release or a price drop goes live, bulk orders pour in. Mixed in with them are buy-outs for resale. They don’t even need bots. Buyers who rotate multiple accounts and addresses can strip an unprotected store’s inventory in a short time, and when genuine customers keep finding everything sold out, trust in the release itself erodes.

There are plenty of countermeasures, but the baseline is the plain purchase quantity limit: put a cap on the quantity per order. That alone multiplies the work for the buy-out side. For products where a legitimate customer only needs one or two, the cap causes almost no real harm.

In this article, I’ll walk through how to set purchase quantity limits on Shopify. I built Validify Checkout Guard, the app that stops orders at checkout, so this comes from the person who made it. For the broader picture of blocking bad orders, I wrote the fraud prevention guide separately.

When you need purchase quantity limits

First, let’s sort out where a quantity cap actually helps.

The first is resale of limited collaborations. Limited goods and collab items pick up a market price right after release, which makes them prime resale targets. If buyers can’t buy out everything in one order, they multiply accounts, but capping how much each account can get still leaves more stock reaching genuine customers.

The second is resale buy-outs during deep-discount sales. Sale prices are thin-margin to begin with. Let someone bulk-buy with no cap and you lose the profit and distort your stock turnover. Rules can be toggled on and off after the fact, so you can also run a stricter cap only for the sale period.

The third is bulk orders abusing coupons. A coupon discounts a single order, so the more items get stacked into it, the bigger the loss. Besides the quantity cap, combining it with stricter treatment for first-time buyers works well. That method is in a later section.

Can Shopify’s built-in features do it

Straight answer: Shopify’s standard checkout settings have no per-order quantity cap. You can control shipping by cart amount or weight, but there’s no setting that stops checkout because of item count alone.

You can limit cart quantity on the theme side, but that’s not a reliable defense. Front-end limits get bypassed by switching browsers, clearing cookies, or opening a direct link with the product already in the cart. Good enough for well-meaning customers, but not a wall for someone whose goal is a buy-out.

The reliable approach is validating quantity on the server, during checkout, before payment completes. Shopify Functions’ Cart & Checkout Validation API is the foundation for that, and the checkout guard I built is a single-purpose app that plugs rules into it. The point is that it works at the checkout stage itself, without touching your theme or templates. The app is also block-only: it stops exactly the orders that match a rule. And it’s designed to fail open, so even if the app itself errors, checkout keeps working. A hiccup in your defense never spills over into regular sales.

A rule example: capping total quantity per order

The simplest shape is a rule using the cart criterion “total quantity”. Every rule is written as criterion + operator + value. Here that’s three parts:

  • Criterion: total quantity
  • Operator: greater than
  • Value: 5

When the sum of quantities across all line items in the cart exceeds 5, in other words 6 items or more, checkout stops. It applies to the whole store regardless of product, so it works as a first wall. The app offers 36 criteria and 18 operators, and you can combine up to 25 rules per policy and 25 conditions per rule, so the natural way to use it is to place this one rule first and add more while watching how it behaves.

Limiting only specific products

If you want a cap on specific products instead of the whole store, use line item criteria. Line items offer criteria like “line quantity”, “SKU”, “product type”, “vendor”, “product”, “collection”, and “product tag”, and you can combine them with AND.

For example, to limit products in the limited collection “limited-drop” to 2 items per line, combine these two conditions with AND:

  • Criterion: collection + operator: is one of + value: limited-drop
  • Criterion: line quantity + operator: greater than + value: 2

This lets you keep limits strict only for limited products and leave regular products under the store-wide cap.

There’s an honest limitation I want to state here. Line item criteria are evaluated per line, as the name says. If the same product ends up in the cart as separate lines, say with different options, each line’s quantity is seen separately; there’s no aggregation that totals quantities across SKUs for the whole cart. To stop a cart like “3 of variant A, 3 of variant B” on the combined total, cover it with the store-wide “total quantity” rule from earlier. I’d rather state plainly what isn’t possible than imply that it is.

Relaxing or tightening by customer history

If the same cap for everyone feels too blunt, combine customer criteria to create tiers. The available ones include “order count”, “total purchase amount”, “customer tag”, and “login status”. Guest purchases count as zero orders. The total purchase amount criterion compares against a value converted to the cart’s currency, so you can also tier by amount instead of item count, for example being stricter only with customers whose total spend is below a set amount.

A design like “first purchase limited to 1 item, relaxed from the second order on” takes two rules. One blocks “order count is 0” AND “total quantity greater than 1”. The other blocks “order count is 1 or more” AND “total quantity greater than 10”. Strict only for the first purchase, generous for people who’ve already bought once. It works cleanly against throwaway accounts created for resale.

In the other direction, customer tags work for exceptions. Tag your regular business customers “b2b”, then block “customer tag does not contain b2b” AND “total quantity greater than 20”. The rule skips tagged customers and applies only to everyone else. When an order matches several rules at once, each matched rule raises its own separate error, so you can see exactly where it stopped.

Also, if you offer cash on delivery, the quantity problem sits right next to the refused-delivery problem. That one is covered in the refused-delivery article.

The message blocked shoppers see

When you stop someone at a quantity limit, blocking in silence is unkind to the buyer. The app lets you write a message that shows the shopper why the block happened. The trick is to state the cap and the next step, something like: “To prevent resale, we limit purchases to 5 items per customer. Please adjust your quantity.” Legitimate customers reduce the quantity and buy again. Messages support 36 languages and display in the shopper’s language, and you can write up to 500 characters. The multilingual support covers this shopper-facing message only; the settings screen itself is in English. Language selection is tiered: if no message matches the shopper’s locale, the closest locale in the same language is used, and failing that, the English message. Whatever language you wrote a message in is what shoppers in that language see.

Getting started

There’s a 7-day free trial. My recommendation is to start with a single store-wide total quantity rule, then spend the trial comparing its behavior against your order history: is it over-blocking anything, is anything slipping through. The app is $5 a month, and your rules are stored inside your own store’s Shopify data. If setup gives you trouble, I answer support myself within 24 hours. You can check the app details here.