Guide7 min read2026-03-14

How to block a product at Shopify checkout based on purchase history

ByViralPilot|Ecommerce SaaS agency, 8 years experience

You have a product that should only be purchased once per person. Maybe it is a trial box. Maybe it is a welcome kit priced at cost. Maybe it is a free sample with $5 shipping. Whatever it is, the offer only makes economic sense if each person buys it exactly one time.

Shopify has no native way to enforce this. There is no setting that says "block this product at checkout if this person has bought it before." So the same people buy your trial box three, four, five times — and you eat the loss every time.

Here is how to actually block a product at checkout based on purchase history.

The use case: products that should only ever be bought once

This is not an edge case. Thousands of Shopify stores sell products that are explicitly designed for first-time buyers only:

  • Trial boxes — A curated sample box at $5 that normally costs $30 to fulfill. The point is to convert the customer to full-price products.
  • Welcome kits — A branded starter kit priced at $1 for new customers, containing products that retail for $40+.
  • Intro subscription offers — First month of a subscription at 80% off. The economics depend on the customer staying for at least three months.
  • Free samples — Pay-shipping-only sample packs meant to introduce new customers to the product line.
  • Loss-leader bundles — A bundle priced below cost to acquire a customer into the ecosystem.

Every one of these products loses money on the first purchase. The business model assumes each person buys it once, becomes a customer, and generates profit on subsequent full-price orders. When the same person buys the loss-leader repeatedly, the model breaks.

Why Shopify has no native solution

It is important to understand what this problem actually is — and is not.

This is not a discount problem. You are not trying to limit a discount code to one use per customer. You are trying to prevent a specific product from being purchased at all by someone who has already bought it. The product itself needs to be blocked at checkout.

Shopify's native "Limit to one per customer" setting on discount codes does not apply here. That setting restricts discount code usage, not product purchases. If your trial box is a standalone product at a fixed low price (not using a discount code), that setting does nothing.

Shopify's purchase limits at the product level are quantity limits — you can limit a customer to buying 2 units per order. But that does not prevent them from placing another order tomorrow. And it definitely does not prevent them from placing an order under a different email.

There is simply no native Shopify feature that says: "If this person has ever purchased Product X, prevent them from purchasing Product X again."

The tools merchants try (and why they fall short)

When merchants realize Shopify cannot do this natively, they reach for third-party tools. Here is what they typically try:

Locksmith

Locksmith is a powerful access control app. It can hide products, collections, and pages from specific customer segments. Some merchants use it to hide their trial box from returning customers.

The problem: Locksmith controls page visibility, not checkout. Even if you hide the product page, a returning customer who has the direct URL or finds the product through search can still add it to cart. And if they use guest checkout with a new email, Locksmith has no way to identify them as a returning customer in the first place. The block needs to happen at checkout, not at the storefront.

Shopify Flow

Shopify Flow can automate actions based on triggers. Some merchants set up flows to cancel orders that contain trial products from returning customers.

The problem: Flow triggers after the order is placed. The customer has already checked out. The payment has been captured. The fulfillment process may have already started. Canceling an order after the fact means issuing a refund, dealing with customer service inquiries, and potentially eating shipping costs if the item already shipped. It is reactive, not preventive.

Mechanic

Mechanic is a task automation app that can run custom scripts. You could theoretically write a Mechanic task to check purchase history and cancel orders.

The problem is the same as Flow: it runs after checkout. You are still processing the payment, then reversing it. And neither Mechanic nor Flow can match customers across different emails or guest checkouts. If someone uses a new email, the automation sees a new customer with no history.

Manual review

Some merchants manually review orders containing trial products. They check the shipping address against previous orders, look for duplicate names, and cancel suspicious orders.

This works at very low volume. It does not work at 100+ orders per day. It is also error-prone — you will miss some and accidentally cancel legitimate orders from people with similar names or shared apartments.

Hiding the product

Some merchants hide the trial product from the storefront entirely and only share it via email to verified new customers.

This reduces abuse but does not eliminate it. Links get shared. Emails get forwarded. And you lose the conversion benefit of having the trial product visible on your store for organic visitors.

None of these tools solve the core problem: blocking the product at the point of checkout, before the order exists, based on cross-account identity matching.

What a checkout-level product block actually requires

To block a product at checkout based on purchase history, you need three things working together:

1. Checkout Extensions API integration

Shopify's Checkout Extensions API allows apps to run server-side logic during the checkout process — after the customer enters their information but before payment is processed. This is the only place where you can actually prevent an order from being completed.

A checkout extension can evaluate the contents of the cart, the customer's identity signals, and return a blocking response that prevents the checkout from proceeding. The customer sees a clear message explaining why they cannot complete the purchase.

2. Multi-signal identity matching

Checking the customer's email against previous orders is not enough. People use multiple emails. They use guest checkout. They create new accounts.

Effective identity matching requires checking multiple signals simultaneously:

  • Email address — The obvious one. Catches the laziest repeat buyers.
  • Shipping address — Fuzzy-matched to catch variations like "123 Main St" vs "123 Main Street" and "Apt 4B" vs "#4B".
  • Phone number — People change emails far more often than phone numbers.
  • IP address — Not definitive on its own (shared networks exist) but valuable as a corroborating signal.
  • Device fingerprint — Browser and device characteristics that persist across accounts and sessions.

When you match on multiple signals, the accuracy goes up dramatically. A new email from the same address, same phone, and same device is not a new customer.

3. Product-level rule configuration

The block needs to be configurable at the product level. You do not want to block returning customers from your entire store — you want to block them from purchasing one specific product (or a set of specific products). The system needs to let you select exactly which products are protected and which are open to everyone.

How to set this up with OfferGuard

OfferGuard is purpose-built for this exact use case. Here is the step-by-step setup:

Step 1: Install and connect

Install OfferGuard from the Shopify App Store. The app connects to your store and begins indexing your existing order history. This historical index is what allows it to identify returning customers even if their last order was months ago.

Step 2: Create a protection rule

In the OfferGuard dashboard, create a new rule. Select the product (or products) you want to protect — your trial box, welcome kit, intro offer, or whatever product should be limited to first-time buyers.

Step 3: Set your blocking conditions

Choose which identity signals to match on. For most merchants, the recommended configuration is all five signals: email, shipping address, phone number, IP address, and device fingerprint. You can adjust the sensitivity — for example, requiring a match on at least two signals before blocking.

Step 4: Configure the customer-facing message

Set the message that blocked customers will see at checkout. Something clear and direct: "This product is available to new customers only. It looks like you've purchased this item before." You can customize this to match your brand voice.

Step 5: Deploy

Enable the rule. OfferGuard's checkout extension activates immediately. Every checkout that contains a protected product will be evaluated against your purchase history in real time.

From this point forward, when a returning customer tries to buy your trial box — even with a new email, even as a guest — the checkout will not complete. They will see your message and be redirected to your full-price products.

What the customer experience looks like

A legitimate new customer sees nothing different. They add the trial box to their cart, go through checkout, and complete their purchase as normal. The identity check happens server-side in milliseconds.

A returning customer who has previously purchased the trial box gets stopped at checkout. They see a clear message explaining the product is for new customers only. They are not banned from the store — they can still buy any other product. Only the protected product is blocked.

This is a critical distinction. You are not banning customers. You are not hiding products. You are enforcing a simple rule: this specific product can only be purchased once per person. Everything else on your store remains fully accessible.

The difference between blocking a product and limiting a discount

This comes up often enough that it is worth addressing directly.

Limiting a discount means a customer can still buy the product — they just pay full price if they have used the discount before. The checkout completes either way.

Blocking a product means the checkout does not complete at all if the customer has purchased that product before. The order is not placed. Payment is not captured. The product does not ship.

If your trial box is a standalone product at a fixed price (not a full-price product with a discount code applied), discount limits do not help you. You need a product-level block. For a deeper comparison, see our breakdown of frontend discount protection vs. checkout blocking.

What happens to your margins

The math is straightforward. If your trial box costs $25 to fulfill and you sell it for $5, every repeat purchase costs you $20. If 10% of your trial box orders are repeat abusers and you sell 500 trial boxes per month, that is 50 orders at a $20 loss each — $1,000/month in preventable losses.

Block those 50 orders at checkout, and that $1,000 goes straight to your bottom line. The trial box still does its job — it still acquires new customers. It just stops subsidizing repeat buyers.

Start blocking repeat purchases at checkout

If you sell any product that is meant to be purchased once per customer, and you are relying on the honor system or post-purchase cleanup to enforce that, you are losing money on every repeat order.

Set up product-level checkout blocking and enforce the rule where it matters — before the order is placed. Check out our pricing page to get started.

Related reading:

Try OfferGuard on your store.

Free plan available. No credit card.

Install free on Shopify