Ecommerce Bot Protection: Stop Card Testers and Scrapers

Published 13 min read

More than half of all web traffic is now automated, and your store pays for the worst of it. Imperva's 2026 Bad Bot Report puts bots at 53% of web traffic in 2025, and its previous edition found that bad bots made up 59% of traffic to retail sites. Good ecommerce bot protection isn't a wall around the whole site. It's a few targeted checks on the pages that cost you money, and this guide shows you which ones.

Most store owners notice bots only when something breaks: 400 declined $1 payments overnight, a limited drop that sells out in nine seconds to people who never wear the product, or a conversion rate that halves while revenue stays flat. Each of those is a different bot with a different fix. Treat them all the same and you end up putting a puzzle in front of every customer while the actual attacker walks around it.

Which Bots Hit Online Stores (and What They Cost)

Not all bots are bad. Googlebot, Google's shopping crawlers, AI search agents and your own uptime monitor are bots too, and blocking them costs you sales. The ones worth stopping fall into six groups:

BotWhat it doesWhere it hitsWhat it costs youFirst fix
Card testersRun stolen card numbers through tiny orders to see which workCheckout, "save card" formsProcessor fees, a flood of declines, disputes, a damaged payment reputationInvisible check on the pay action, processor fraud tools
Credential stuffersTry leaked email and password pairs on your loginLogin, password resetHijacked accounts, stored-card fraud, angry customersCheck on login, per-account rate limits
Scalpers and inventory hoardersBuy or hold limited stock faster than humansAdd to cart, checkout during dropsReal fans miss out, resale at a markup, brand damagePer-customer limits, short cart holds
Price and content scrapersCopy prices, stock levels and product copyProduct and category pagesCompetitors undercut you, duplicate copy, server loadEdge rules and rate limits; accept some
Fake signups and promo abusersCreate accounts to farm first-order discounts and referral creditSignup, coupon fieldsMargin leak, polluted email listCheck on signup, one code per customer
AI crawlersFetch pages for AI training, search and shopping answersEverywhereBandwidth, but also your visibility in AI answersDecide per crawler, don't block blindly

Two of these deserve extra attention because they cost real money fast.

Card testing is automated and indiscriminate. Stripe describes it as fraudsters running stolen card lists through small payments, and lists the consequences: disputes, extra fees, and a higher decline rate that can make issuers treat your legitimate payments as riskier even after the attack stops. If you've ever wondered why your authorization rate dropped for no reason, look for a week of card testing first. We cover the payments side in how to reduce payment declines.

Scalping is the one edge tools struggle with most. A scalper bot often looks like a fast, well-behaved browser that happens to add the right product to cart 50 times from 50 residential IPs. The controls that reliably stop it live in your business logic, not your firewall.

How to Tell You Have a Bot Problem

You usually don't need a security vendor to diagnose it. Look for these signs:

  • A spike in failed payments on small amounts, often with nonsense names and emails. That's card testing until proven otherwise.
  • Sessions up, conversion rate down, revenue flat. Something is visiting that will never buy.
  • Hundreds of new accounts with no orders, or a burst of signups from one email pattern (jdoe1@, jdoe2@...).
  • Limited products selling out instantly and reappearing on resale sites the same day.
  • Carts holding your entire stock of a SKU and expiring without purchase.
  • Server or bandwidth bills climbing without a matching rise in orders, with logs showing one user agent or network requesting thousands of product pages.
  • Login failures in bulk across many different accounts, which is credential stuffing rather than one customer who forgot their password.

Keep one caveat in mind when you read your analytics: Google Analytics automatically excludes traffic from known bots, so the bots that do show up there are the ones pretending to be human. Your server and payment logs tell the fuller story.

Ecommerce Bot Protection, Layer by Layer

The mistake most stores make is choosing one tool and expecting it to stop everything. Each class of bot slips past a different layer, so effective ecommerce bot protection stacks four of them:

Ecommerce bot protection in four layers: an edge filter on every request, invisible checks on checkout, login and signup, business rules in the backend such as purchase limits and cart holds, and payment risk scoring at authorization

Layer 1: Filter at the edge

Your host or CDN sees every request before your store does. A managed bot ruleset there drops the obvious traffic: known bad bots, request floods, and scripts that claim to be Chrome but don't behave like it. This is cheap, mostly free and needs no code. It won't stop a determined attacker using a real headless browser, and it shouldn't try to, because aggressive edge rules are how real shoppers end up staring at a challenge page.

Layer 2: Invisible checks on the actions that cost money

This is where to start if you do only one thing. Instead of protecting pages, protect actions: placing an order, logging in, creating an account, applying a coupon and adding a limited item to cart. An invisible check runs in the background and only shows a challenge when the signals look wrong. Product pages stay open to everyone, including search engines and AI shopping agents.

On a Next.js store deployed to Vercel, BotID does this in two small files. The client side declares which requests to protect:

// instrumentation-client.ts
import { initBotId } from "botid/client/core";

initBotId({
protect: [
{ path: "/api/checkout", method: "POST" },
{ path: "/api/auth/*", method: "POST" },
],
});

The server side checks the request before doing anything expensive:

// app/api/checkout/route.ts
import { checkBotId } from "botid/server";

export async function POST(request: Request) {
const { isBot } = await checkBotId();
if (isBot) {
return Response.json({ error: "Access denied" }, { status: 403 });
}

// Create the checkout session as usual.
}

Two details catch people out. A route you check on the server but forget to list on the client fails every time, because the client never attached the headers. And local development always returns isBot: false, so test on a preview deployment, not on localhost.

Not on Vercel? Cloudflare Turnstile and hCaptcha do the same job as a widget you add to the form and verify on your server.

Layer 3: Business rules in your backend

No bot detector understands your inventory. Scalpers and hoarders that pass every browser check still have to obey your rules, so write the rules:

  • Per-customer purchase limits on limited products, enforced at checkout against the account, the email, the shipping address and the card, not just the cart.
  • Short cart holds during drops. A cart that reserves stock for 30 minutes is a free inventory lock for a bot; reserve at payment, or for a few minutes at most.
  • Rate limits per account and per IP on login, signup and coupon redemption. Vercel's WAF supports rate limiting rules on every plan, and Cloudflare offers the same.
  • One discount code per customer and first-order offers tied to verified emails, not raw signups.
  • Generic payment errors. "Your card was declined" tells a human enough. "Incorrect CVC" tells a card tester which half of the card is valid.

Layer 4: Payment risk scoring

Some fraud comes from a real browser, operated by a real person, using a stolen card. That's your payment processor's job. Stripe's card-testing controls work best when you use Stripe Checkout or the Payment Element, which add rate limits, machine-learning models and CAPTCHA challenges when an attack is detected, and its basic Radar fraud screening is included at no extra charge on standard pricing. The fraud side has its own playbook in our ecommerce fraud prevention guide.

Don't Block the Bots That Bring You Customers

Here's the trade-off that bot protection guides written by security vendors rarely mention: AI shopping agents and AI search crawlers are now a sales channel. If your bot rules block them, your products stop appearing in AI answers. Several vendors run separate crawlers for training and for live search, and you can treat them differently. OpenAI, for example, documents GPTBot for training and OAI-SearchBot and ChatGPT-User for search and user-triggered fetches.

In Next.js, app/robots.ts makes that policy explicit:

// app/robots.ts
import type { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: ["OAI-SearchBot", "ChatGPT-User", "PerplexityBot"], allow: "/", disallow: "/checkout" },
{ userAgent: "GPTBot", disallow: "/" },
{ userAgent: "*", allow: "/", disallow: ["/cart", "/checkout", "/account"] },
],
sitemap: "https://example.com/sitemap.xml",
};
}

Remember what robots.txt is: a request, not a lock. Polite crawlers honor it; scrapers ignore it. It decides which good bots see what, and the layers above handle the rest. Whether to allow training crawlers is a business decision, not a security one. For the visibility side, see generative engine optimization for ecommerce.

💡

Test your setup the way an AI agent sees it: curl -A "OAI-SearchBot" https://yourstore.com/products/some-product should return the product page HTML, not a challenge page. If it doesn't, your edge rules are stricter than your robots.txt.

The Best Bot Protection Tools for Ecommerce

You don't need all of these. Most small and mid-size stores need one edge layer, one invisible check and their processor's fraud tools. Prices as of December 2026.

ToolLayerBest forPrice
Cloudflare (Bot Fight Mode, Turnstile)Edge and form checksStores already behind CloudflareBot Fight Mode and Turnstile free; Bot Management on Enterprise
Vercel Firewall and BotIDEdge and action checksNext.js stores hosted on VercelBot ruleset and BotID Basic free on all plans; Deep Analysis $1 per 1,000 checks on Pro
hCaptchaForm checksPrivacy-focused challenges on any stackFree tier; Pro and Enterprise paid
DataDomeFull bot managementHigh-traffic stores with scraping and scalping problemsCustom, through sales
Akamai Bot ManagerFull bot managementEnterprise retailers already on AkamaiCustom, through sales
Stripe RadarPayment riskAny store taking payments through StripeBasic screening included on standard pricing

Cloudflare

Cloudflare Bot Management product page with the headline "Stop bad bots, not your customers"

If your domain already runs through Cloudflare, Bot Fight Mode is a free switch that challenges traffic matching known bot patterns. Its paid tiers add Super Bot Fight Mode and, on Enterprise, full Bot Management with bot scores you can write rules against.

Cloudflare Turnstile page, "Verify Visitors Without CAPTCHA"

Turnstile is Cloudflare's free CAPTCHA replacement. It works on any site, whether or not the rest of your traffic goes through Cloudflare, which makes it the default form check for stores hosted elsewhere.

Vercel Firewall and BotID

Vercel BotID page, "The invisible bot detection engine", with a code sample calling checkBotId

For Next.js stores on Vercel, the bot protection managed ruleset challenges non-browser traffic and skips verified bots like Googlebot automatically, while a separate AI bots ruleset lets you log or deny known AI crawlers. BotID adds the invisible per-action check shown above, with an optional Deep Analysis mode powered by Kasada for sophisticated bots.

hCaptcha

hCaptcha Enterprise homepage showing human, AI agent, good bot and bad bot traffic sorted into card testing, account takeover and normal activity

hCaptcha is a widely used Turnstile alternative and the CAPTCHA Stripe itself uses in Checkout's card-testing defenses. The free tier covers most small stores; paid plans add passive modes that skip the puzzle for most visitors.

DataDome

DataDome block page reading "You have been blocked", shown to the headless browser used to take screenshots for this post

We tried to screenshot DataDome's homepage for this post with a headless browser. That's the page we got. It's the most honest product demo in this article: DataDome specializes in exactly this kind of detection, including the scrapers and scalpers that edge rules miss. It's priced for stores where bots are a serious line item.

Akamai Bot Manager

Akamai Bot Manager product page, "Stop the most dangerous, evasive bots before they erode customer trust"

Akamai Bot Manager is the enterprise option, strongest for retailers already using Akamai's CDN. Like DataDome, it's sold through sales and sized for large catalogs and heavy drop traffic.

Stripe Radar

Stripe Radar page, "Stop fraud without stopping growth"

Stripe Radar is the payment layer. It won't stop scrapers or fake signups, but it scores every payment and blocks card-testing bursts that get past everything else.

What Nobody Tells You About Bot Protection

These are the problems that show up a few months in, not on day one:

  • Your payment webhooks can get challenged. Edge bot rules see Stripe's webhook calls as automated traffic, because they are. Cloudflare notes that Bot Fight Mode may challenge API traffic and can't be overridden with WAF custom rules. If orders stop confirming after you flip a switch, check your webhook delivery logs first, and use a tier or tool that lets you bypass webhook paths.
  • Two edge layers fight each other. Vercel's bot ruleset doesn't work behind another reverse proxy such as Cloudflare: real shoppers get re-challenged and detection degrades. Pick one edge and let it see the real client.
  • Your own tools are bots too. Uptime monitors, price feed fetchers, Google Merchant Center's crawlers, your ERP sync and your load tests all look automated. Allowlist them deliberately before launch, not after a supplier calls.
  • Sale days are when you'll want to tighten rules, and when it hurts most. A rule that challenges 2% of shoppers is noise in March and real money on Black Friday. Run new rules in log-only mode for a week before you enforce them; Vercel's bot ruleset has a log mode for exactly this, and most WAFs offer something similar. Add bot checks to your Black Friday checklist weeks ahead.
  • You'll never get to zero. Some price scraping is the cost of having public prices. Measure bots by what they cost you (declines, fees, lost stock, server bills), not by how many you blocked.

The Rules Around Bots and Bot Detection

Bot detection reads signals such as IP addresses and browser characteristics, and in the EU and UK that's personal data under GDPR. The regulation itself says that processing strictly necessary for preventing fraud is a legitimate interest, which is the basis most bot tools rely on. List your bot protection provider in your privacy policy, and check whether its script sets cookies or similar identifiers that your cookie consent setup needs to account for.

In the US, the Better Online Ticket Sales Act bans bots that get around purchase limits on event tickets, but there's no federal equivalent for sneakers, consoles or other limited products. In practice, your own purchase limits and terms of sale are what protect a drop.

⚖️

Always check the current rules where you sell. This section summarizes US, EU and UK rules as of December 2026. Privacy and consumer laws change and vary by country, so confirm the details with your local data protection authority or a privacy specialist before you deploy bot detection. This is general information, not legal advice.

A One-Afternoon Bot Protection Plan

If you run a small store and want the biggest wins first:

  1. Check your processor dashboard for a spike in small declined payments. If you see one, refund the successful test charges now to head off disputes.
  2. Add an invisible check to checkout, login and signup. BotID on Vercel, Turnstile or hCaptcha anywhere else.
  3. Switch on your host's managed bot ruleset in log mode, review a week of logs, then enforce.
  4. Rate-limit login, signup and coupon redemption per account and per IP.
  5. Set per-customer limits on anything you sell in limited quantities, and shorten cart holds during drops.
  6. Write your robots.txt policy for search engines and AI crawlers, and test it with curl.
  7. Make payment errors generic and confirm your processor's fraud screening is on.

Where Your Next Store Fits

Your Next Store homepage with Elliot AI

Your Next Store isn't a bot protection tool, but its architecture lines up with the layers above. The storefront is an open-source Next.js app hosted on Vercel, so Vercel's firewall rules and BotID's instrumentation-client.ts setup apply to it directly; you own the code, so adding a check to checkout is a few lines, not a support ticket. Payments run through Stripe Checkout Sessions, which carry Stripe's card-testing defenses, and products, carts and orders live in the YNS backend, not in the browser. Product pages are server-rendered with JSON-LD structured data, so the good bots (Google, AI search agents) get clean HTML without you loosening the rules that stop the bad ones.

What YNS won't do for you is tune your firewall or decide which AI crawlers to allow. Those are your calls, and this guide is the checklist.

FAQ

What percentage of ecommerce traffic is bots?

It depends on the store, but industry data puts it high. Imperva's 2025 Bad Bot Report found that bad bots alone made up 59% of traffic to retail sites in 2024, and bots of all kinds passed half of all web traffic. A small store's share is usually lower, though a single card-testing attack can make it briefly much higher.

Does a CAPTCHA hurt ecommerce conversion?

A visible puzzle on every page does. Invisible checks such as BotID, Turnstile or passive hCaptcha only challenge suspicious sessions, so most real customers never see anything. Put them on checkout, login and signup rather than product pages, and run new rules in log-only mode first so you can see who would have been blocked.

Should I block AI crawlers on my online store?

Usually not all of them. AI search and shopping agents can send you customers, so allow the search and user-triggered crawlers and make a separate business decision about training crawlers. Block or rate-limit any crawler that ignores robots.txt or hammers your server.

The Bottom Line

You can't stop every bot, so don't try: guard the four doors that cost money (checkout, login, signup and your limited stock) and leave the shop window open for everyone else.

25-point store checklist cover

Before you spend more on ads,
check your store.

Get a free 25-point checklist to find what could be holding back your sales, from product pages to checkout.

No spam. Unsubscribe anytime.

Build store for free