Browse apps

Guide

Shopify Fraud Prevention: Blocking Bad Traffic & Risky Checkouts

TL;DR

Effective Shopify fraud prevention combines two distinct layers. Storefront rules in the browser filter out unwanted visitors, scrapers, Tor exit nodes and datacenter bots before they browse your catalog. Server-side Cart and Checkout Validation Functions run on Shopify servers to block risky orders by email, phone, address, ZIP code, country or customer tag before payment.

Shopify stores deal with two very different kinds of unwanted activity: automated traffic that scrapes product pages or probes your storefront, and problem buyers who submit risky or abusive orders at checkout. Treating both problems with a single browser script leaves a gap at checkout, while relying only on post-order fraud scores means you have already paid payment processing fees or locked up inventory.

A complete defense separates traffic and bot blocking on the storefront from server-side validation at checkout. With LabX Fraud Filter, you configure both layers from one dashboard while keeping your store fast for legitimate shoppers. For stores selling into the European Union, pairing checkout protection with clear post-purchase rules—see our EU withdrawal button guide—keeps both checkout and post-order operations predictable.

Why do Shopify stores need pre-checkout fraud prevention?

Shopify’s built-in fraud analysis evaluates orders after checkout completes. While post-order indicators help you decide whether to fulfill a suspicious order, several problems already happen the moment a bad checkout goes through:

  • Payment processing fees are non-refundable: Most payment gateways keep their transaction percentage even when you cancel and refund a fraudulent order minutes later.
  • Card testing floods your checkout: Attackers use stolen card lists and automated scripts to test small purchases, generating dozens of failed or low-value orders that can trigger gateway scrutiny.
  • Cash-on-delivery (COD) and fake orders tie up stock: Stores offering manual payment methods or COD can have inventory reserved by fake names, throwaway emails, or unserviceable addresses.
  • Repeat abusers and restricted buyers slip through: Serial returners, known resellers, or buyers shipping to problematic freight forwarders will keep ordering unless checkout actively rejects their details.

Stopping these orders before payment is captured requires rules that run during the checkout step itself.

How do storefront blocking and checkout validation differ?

Understanding where a rule runs is essential so you know what it can and cannot stop. Shopify apps operate across two separate layers:

LayerWhere it runsWhat it checksCan a buyer bypass it?
Storefront blocking (Fraud Guard app embed)In the visitor’s browserIP, CIDR range, country, region, ISP/ASN, device, OS, browser, referrer, URL path, product, collection, Tor, datacenter traffic, disposable newsletter emailsYes, by disabling JavaScript or calling the Cart API directly
Checkout protection (Cart & Checkout Validation Function)On Shopify’s serversBuyer email, phone number, name, country, shipping address, ZIP/postal code, customer tagNo—runs server-side on every cart and checkout submission

Because Shopify serves storefront pages directly from its CDN, no third-party app can intercept an HTTP request before it reaches the visitor’s browser. Storefront rules are ideal for keeping scrapers, unwanted regions, and casual bots out of your catalog. Checkout rules, by contrast, execute inside Shopify’s backend infrastructure. Even if a buyer disables JavaScript or submits a checkout via API, the validation function still enforces your rules.

What can you block at Shopify checkout?

In LabX Fraud Filter, checkout protection rules test the data the buyer typed into the checkout form—or the tags on their customer account—rather than the network connection they arrived on. You can create independent checkout rules for:

  1. Email address: Block exact email addresses or domains associated with past chargebacks, abuse, or disposable inbox providers.
  2. Phone number: Reject specific phone numbers or prefixes used in fake COD orders.
  3. Buyer name: Block known fake names or test strings submitted by automated scripts.
  4. Shipping country: Restrict checkout for specific countries without having to restructure all of your shipping zones.
  5. Street address: Stop orders heading to specific blacklisted street addresses, known problem warehouses, or P.O. boxes where your carrier cannot deliver.
  6. ZIP or postal code: Block high-risk or unserviceable postal codes with a clear explanation.
  7. Customer tag: Tag accounts in Shopify Admin (for example, serial-returner, chargeback-history, or wholesale-blocked) and prevent those accounts from completing checkout.

Each checkout rule carries its own custom error message. When a buyer matches a rule, Shopify displays your exact message at checkout so legitimate customers who made a simple mistake—such as entering a P.O. box when you require a street address—know how to fix their order.

How does rule precedence keep real customers from being locked out?

A common fear when setting up security rules is accidentally blocking search engines, your own staff, or paying customers during a server hiccup. LabX Fraud Filter is built around strict safety guardrails:

  • Fail-open architecture: Both storefront and checkout layers fail open. If the geo endpoint is unreachable on the storefront, the visitor is allowed through. If a checkout validation configuration is unreadable, the Shopify Function returns zero errors so real buyers can always pay.
  • Clear order of precedence: On the storefront, the app evaluates rules in a deterministic order:
    1. Admin bypass link: A rotatable secret link in Settings lets you and your team browse the store while skipping every rule.
    2. Built-in crawler allowlist: Search engines and link preview bots (Google, Bing, social crawlers, SEO tools) are allowed through before block rules run, unless you explicitly turn search engine access off.
    3. Your “Always allow” whitelist rules: Trusted IPs, partners, or regions you whitelist always pass.
    4. Bot, Tor, and datacenter toggles: Automated traffic checks run next.
    5. Redirect and block rules: Country-except rules, custom redirects, and block rules run last. Everything unmatched is allowed by default.

How do you set up a layered fraud defense in 10 minutes?

You do not need hundreds of rules on day one. Start with a clean baseline and expand based on your store’s actual order history and visitor analytics:

  • Enable the Fraud Guard app embed in your Shopify theme editor so storefront rules travel with your pages.
  • Save your Admin bypass link in your browser once so you never block your own session while testing.
  • Turn on automatic Tor and datacenter blocking if your store suffers from automated price scrapers or bot waves from hosting providers.
  • Add disposable-email blocking to keep throwaway addresses out of your newsletter signup forms.
  • Create server-side checkout rules for any specific emails, phone numbers, addresses, ZIP codes, or customer tags that have caused chargebacks or fake orders.
  • Import existing blocklists via CSV (up to 2,000 lines at a time) if you are migrating rules from an old tool or spreadsheet.

For deeper guides on IP ranges, country redirects, and bot management, explore the LabX blog or visit our traffic and bot blocking guide.

Frequently asked questions

Can buyers bypass storefront blocking rules by turning off JavaScript?

Yes. Storefront rules run in the visitor browser via a theme app embed, so disabling JavaScript bypasses them. No Shopify app can intercept storefront requests before the browser receives the page. That is why checkout rules must run server-side as a Shopify Validation Function.

How does server-side checkout protection work on Shopify?

Checkout rules run on Shopify servers as a Cart and Checkout Validation Function. They inspect the email, phone number, name, country, street address, ZIP code or customer tag entered at checkout and return a custom error message when a rule matches.

What happens if the fraud app server goes down?

LabX Fraud Filter fails open. If our servers are unreachable or a configuration cannot be read, visitors and buyers are allowed through so an outage never locks real customers out of your store.

Will fraud blocking rules slow down my storefront?

Most storefront rules travel with the page inside a Shopify metaobject and need no network request. Location, Tor and datacenter checks make one GeoIP request per browsing session, cached for 30 minutes.

Sources

  1. Shopify Dev Docs — About Cart and Checkout Validation Functions

Put your first blocking rule live in minutes

Install LabX Fraud Filter free on Shopify, turn on the Fraud Guard embed and add your rules.

Install free on Shopify

Free plan available