A card testing attack rarely looks like traditional high-ticket fraud at first glance. Instead of one suspicious buyer ordering your most expensive product, your Shopify admin suddenly fills with dozens—or hundreds—of abandoned checkouts, declined payment attempts, and small orders for your cheapest SKU placed seconds apart.
When card testing attacks hit Shopify stores, waiting to cancel suspicious orders after payment capture is already too late. Even when you refund a captured order immediately, payment processors keep their non-refundable transaction fees, and a spike in authorization failures or chargebacks can put your merchant account under review.
In this guide, we break down how carding bots operate on Shopify, how to recognize an active attack in your logs, and how to combine storefront bot mitigation with server-side checkout rules using LabX Fraud Filter. For a broader overview of layered store security, see our Shopify fraud prevention guide.
What is a card testing attack on Shopify and why does it hurt margins?
Card testing (also called carding or account checking) happens when fraudsters obtain lists of stolen credit or debit card numbers and use automated scripts to find out which cards are still active. Rather than guessing whether a card works on a high-value transaction, bots submit small checkout attempts on live e-commerce stores and read the payment gateway response.
If the card is declined, the script moves to the next number in the list. If the payment succeeds, the bot records the card as live so it can be used for larger fraudulent purchases elsewhere.
For a Shopify merchant, a single wave of card testing creates four immediate operational problems:
- Non-refundable payment processing fees: When a tested card succeeds and your store automatically captures payment, cancelling and refunding that order does not return the gateway processing fee. As we detailed in our comparison of Shopify Fraud Filter alternatives, post-order cancellation still leaves you paying the percentage and fixed per-transaction fee on every captured test order.
- Chargeback fees and dispute ratios: Legitimate cardholders eventually spot the small test charges on their statements and file disputes. Payment networks monitor dispute counts closely, meaning repeated small test disputes count against your dispute rate just like larger disputes.
- Polluted analytics and abandoned checkout flows: Carding bots generate massive spikes in fake sessions and abandoned checkouts. If you run automated abandoned-cart emails or SMS flows, your marketing tools may send hundreds of messages to disposable or fabricated addresses, hurting your sender reputation.
- Inventory locks on entry-level SKUs: When test orders go through on physical products, stock is deducted from your available inventory until your team manually cancels and restocks each order.
How can you tell if carding bots are probing your Shopify checkout?
Distinguishing an automated carding wave from a normal promotion spike comes down to examining both your Shopify order timeline and your storefront traffic and bot blocking logs. Look for these warning signs:
| Signal Category | Normal Shopper Behavior | Card Testing Bot Pattern |
|---|---|---|
| Order velocity & timing | Orders arrive at natural intervals matching ad traffic or time zones | Bursts of checkout attempts every few seconds, often overnight |
| Cart contents | Varied product mix and average order value | Repeated single-unit carts containing your lowest-priced item, gift card, or sample SKU |
| Customer email & phone | Real inbox domains and regionally consistent phone formatting | Disposable email domains (@mailinator.com, @tempmail.com), random character strings, or sequential digits |
| Shipping address & ZIP | Deliverable residential or business addresses matching the buyer’s region | Reused street addresses across dozens of different names, PO Boxes, freight forwarders, or mismatched ZIP codes |
| Network origin | Consumer broadband and mobile carrier ISPs | Cloud hosting providers (datacenter ASNs), Tor exit nodes, or headless browser signatures |
In Shopify’s native Fraud Analysis report on a completed order, you may also notice multiple payment attempts with different cards from the same session before one card finally succeeded. However, native fraud indicators only appear after an order is created—they do not block the bot while it is still at the checkout form.
Why do you need both storefront and server-side checkout defenses?
Many merchants try to stop carding bots using only one type of tool: either a browser-based IP blocker on the storefront, or a post-order cancellation workflow in Shopify Admin. Both approaches leave an architectural gap.
On Shopify, storefront pages are served directly from Shopify’s CDN to the visitor’s browser. Storefront security apps run via a theme app embed (Fraud Guard in LabX Fraud Filter). When a bot loads your product page in a standard or headless browser, the storefront embed checks the visitor’s IP, country, ISP/ASN, user-agent, Tor status, and datacenter flag, and displays a block page before the bot can click “Add to Cart.”
However, storefront blocking runs in the visitor’s browser. A sophisticated carding script that disables JavaScript, skips storefront pages via a direct cart permalink, or sends HTTP requests straight to Shopify’s Cart and Checkout endpoints will bypass any browser script. No Shopify app can intercept raw storefront HTTP requests before the browser receives the page.
To stop bots that bypass the browser, you must enforce rules at the second layer: Checkout Protection powered by Shopify Cart and Checkout Validation Functions. Because a Validation Function executes server-side on Shopify’s own infrastructure during cart and checkout progression, it cannot be bypassed by turning off JavaScript or calling checkout endpoints directly.
| Defense Layer | Where It Executes | What Carding Signals It Stops | Can Bots Bypass It? |
|---|---|---|---|
Layer 1: Storefront (Fraud Guard app embed) | In the visitor’s browser on page load | Datacenter/hosting IPs, Tor exit nodes, headless browsers, unknown bots, blocked countries, CIDR subnets, disposable emails on newsletter forms | Yes, if the script disables JavaScript or calls Cart/Checkout APIs directly |
| Layer 2: Checkout Protection (Shopify Validation Function) | Server-side on Shopify’s backend servers | Disposable or blacklisted checkout emails, fake phone numbers, test names, restricted countries, repeated street addresses, problem ZIP codes, and blocked customer tags | No—Shopify evaluates the function on the server before checkout can complete |
Using both layers together gives you defense in depth: storefront rules absorb the noisy browser-based bots and scrapers early, while server-side checkout validation catches direct-to-checkout scripts before they can submit a payment authorization.
How do you configure storefront rules to filter carding bots early?
Your first step in LabX Fraud Filter is shutting down automated traffic sources on the storefront without slowing down real buyers or hurting search engine rankings:
- Enable automatic bot, Tor, and datacenter mitigation: In Settings > Mitigator, turn on Auto-block unknown bots, Auto-block suspicious crawlers (including Unknown user agent and Headless hints such as
webdriveror missing browser signals), Block Tor traffic, and Block datacenter traffic. Because automated carding scripts almost always run from cloud servers rather than home internet connections, blocking datacenter traffic cuts off hosting IP ranges while leaving real shoppers—including those on consumer VPNs—unaffected. You can follow the step-by-step setup in our bot and content protection user guide. - Keep verified search crawlers allowlisted: Turning on bot mitigation will not hurt your Google rankings. LabX Fraud Filter evaluates a built-in allowlist of 25 known search engine, social, AI, and SEO crawlers before running your bot switches or block rules.
- Block repeat attacking IPs, prefixes, and subnets: Open Visitor (the Visitor log) to inspect the 50 most recent blocked or redirected visits, or check your order logs for the IP addresses behind failed checkout waves. In Blocking Rules > IP Address, you can block exact IPv4/IPv6 addresses, address prefixes (
IP Start With), CIDR blocks, or IP ranges, and tag the rule with the+ Repeated card testing attemptsnote chip so your team knows why it was added. If you have a large list of offending IPs from a recent attack, upload them via CSV (up to 2,000 lines per import). - Restrict unsupported countries or ISPs: If your store only ships domestically, use Blocking Rules > Location in Block all except… mode so visitors outside your shipping markets see your block screen immediately, or add ISP rules to block specific Autonomous System Numbers (ASNs) that repeatedly host abusive bots.
Storefront rules that do not require geolocation travel inside a Shopify metaobject directly with the page, requiring zero extra network requests. Location, Tor, and datacenter checks make a single GeoIP lookup per browsing session, cached for 30 minutes, and the entire system fails open if the server is ever unreachable so legitimate shoppers are never locked out.
How do you block card testing payloads server-side at checkout?
Because disposable-email blocking on the storefront only covers newsletter signup forms—and because API-driven bots skip the storefront altogether—you should configure server-side rules in Checkout Protection. You can see screenshots of each field in the Checkout Protection documentation.
When a carding wave hits, attackers almost always reuse specific patterns in the checkout form data. In Checkout Protection > Add rule, set up rules across these conditions:
- Block disposable email domains and repeat attacker emails (
Email—ContainsorExact match): Carding scripts rarely use real consumer email accounts. Create anEmailrule usingContainsmode and click the quick-add disposable domain chips (such as+ @mailinator.comor+ @tempmail.com), or paste the specific domains and email substrings appearing in your abandoned checkouts. - Reject placeholder phone numbers (
Phone—Exact matchorContains): Bots often fill required phone fields with dummy strings like1234567890,0000000000, or the same phone number across hundreds of card attempts. The checkout function strips formatting characters and compares phone numbers by digits alone, so blocking5550109999catches+1 (555) 010-9999and555-010-9999automatically. - Stop repeated shipping street addresses and ZIP codes (
AddressandZip): When testing stolen cards on physical goods, bots frequently hardcode a single real street address, a PO Box, or a freight forwarder address along with one postal code. Adding that street substring or ZIP code to Checkout Protection immediately halts every subsequent checkout attempt using that destination. - Filter scripted buyer names (
Name): If a bot script submits the same first name, last name, or test string on every attempt, add aNamerule to reject it on Shopify’s servers. - Enforce shipping country and customer tag rules (
CountryandCustomer tag): Block checkouts targeting high-risk countries you do not serve, or tag abusive customer accounts in Shopify Admin and block those tags from completing checkout. During a severe attack on a wholesale or members-only catalog, you can even useCustomer taginnonemode to block everyone—including guests—who does not carry an approved tag such asvip.
For each checkout rule, customize the error message (up to 255 characters) and choose whether it appears at the Top of checkout or Next to the field that triggered the rule. If a real customer accidentally triggers an address or email rule, a clear inline message tells them how to correct their details without losing the sale.
What should you do during an active card testing wave?
If your store is experiencing a card testing attack right now, run through this 10-minute response checklist:
- Save your Admin access link first: Go to Settings > General settings in LabX Fraud Filter and open your Admin bypass link once in your browser so you cannot accidentally lock yourself out while adding aggressive rules.
- Inspect the last 10–20 failed or suspicious checkouts: Write down any shared email domain, repeated phone number, identical street address, ZIP code, buyer name, or shipping country.
- Add a server-side Checkout Protection rule immediately: Enter the shared email domain, phone digits, street address, or ZIP code into Checkout Protection and save. Because this runs as a Shopify Function on Shopify’s servers, it takes effect at checkout right away even against headless or API bots.
- Turn on Datacenter, Tor, and Unknown Bot switches: In Settings > Mitigator, enable Block datacenter traffic, Block Tor traffic, Auto-block unknown bots, and Auto-block suspicious crawlers.
- Enable manual payment capture temporarily if needed: In Shopify Admin (Settings > Payments), switching from automatic to manual payment capture during a severe attack prevents your gateway from automatically capturing funds—and charging non-refundable capture fees—on any test order that slips through while you tune your rules.
- Review Analytics and the Visitor log: Check Analytics and Visitor in LabX Fraud Filter to confirm that blocked attempts are being caught and to add any recurring attacker IP subnets to Blocking Rules > IP Address.
Frequently asked questions
Why do carding bots target low-priced items on Shopify stores?
Attackers test stolen card lists against inexpensive products, digital items, or low-shipping SKUs because small authorizations are less likely to trigger immediate bank fraud alerts. Once a card passes authorization on your checkout, the attacker uses or resells that verified card for larger purchases elsewhere.
Can storefront IP or country blockers stop every card testing attack?
Not on their own. Storefront blocking runs in the visitor browser via a theme app embed, which blocks browser-based bots, Tor exit nodes, and datacenter scrapers early. However, an attacker who disables JavaScript or submits payloads directly to the Cart and Checkout API can bypass browser scripts. That is why you should pair storefront filtering with server-side Checkout Protection.
How does a Shopify Checkout Validation Function block carding attempts?
A Cart and Checkout Validation Function runs on Shopify servers whenever a buyer submits or advances through checkout. It checks the buyer email, phone number, name, street address, ZIP code, country, or customer tag against your block rules and rejects matching checkouts before payment is processed.
Does blocking datacenter traffic lock out shoppers who use consumer VPNs?
No. Datacenter blocking targets server and cloud hosting IP ranges where automated scripts and headless browsers run. Shoppers using consumer privacy VPNs usually route through consumer or residential networks and are not blocked by the datacenter switch.
Sources
Part of our guide: Shopify fraud prevention →