Guide

Card testing attacks on WooCommerce: how to spot them and slow them down

Bursts of small failed orders from strangers usually mean bots checking stolen cards on your checkout. How to recognise an attack, and the layers that make your store a poor target.

Updated

The short answer

A card testing attack shows up as many failed orders in a short time — small amounts, the same cheap product, unfamiliar names, often as guests. Bots are checking stolen card numbers through your checkout. To slow them down, layer several measures:

  • turn on your payment gateway's fraud and card-testing protection, and talk to the provider;
  • rate-limit the checkout — WooCommerce has a setting for it — and the order-pay page;
  • add a CAPTCHA or bot challenge that protects the order request itself;
  • during an attack, temporarily require accounts or raise the minimum order.

No single step stops every attack. Together they make your store a slower, costlier target than the next.

How to recognise card testing

  • Many failed orders in minutes or hours, far more than your usual handful a week.
  • Small amounts — the cheapest product, a sample, a donation — and the same item over and over.
  • Odd customer details: random-looking names and emails, billing addresses that don't match the card's country, the same address with different cards.
  • Guest checkouts, often at night in your time zone, from many IP addresses or a few that repeat.
  • Many attempts on one order. The order notes of a single failed order list decline after decline: the order's payment page is being reused to try card after card.
  • Decline codes in the gateway's dashboard such as incorrect number, incorrect security code or stolen card, in bulk.

A handful of declines from real shoppers is normal — those are covered in WooCommerce failed orders. Card testing is the burst.

What to do while it is happening

  1. Tell your payment provider. They see the attack across many stores, can tighten rules on your account, and need to know before disputes arrive.
  2. Turn on the gateway's protection. Most providers offer risk rules, card-testing detection and 3-D Secure; some gateway plugins add a challenge on the checkout. Check your gateway plugin's settings and the provider's dashboard.
  3. Make guest checkout harder for a while. Under WooCommerce → Settings → Accounts & Privacy, temporarily require an account to place an order. It costs real sales too, so switch guest checkout back on afterwards — why guest checkout matters.
  4. Block at the edge. If your host or CDN has a firewall, challenge or rate-limit traffic to the checkout addresses while the attack lasts.
  5. Don't ship anything paid during the attack until you are sure the buyer is real, and refund payments that came from it.

Rate-limit the checkout

Recent WooCommerce versions include a checkout rate limit, off by default. Find Rate limit Checkout under WooCommerce → Settings → Advanced → Features. It limits how often one IP address can place an order, on both the classic and the block checkout.

The limit is applied per IP address. If your store sits behind a CDN or proxy, every request can appear to come from the proxy's address, so the limit either blocks real shoppers or nobody. WooCommerce's woocommerce_store_api_rate_limit_options filter can turn on proxy support so the visitor's own address is read from the forwarded headers:

add_filter( 'woocommerce_store_api_rate_limit_options', function ( $options ) {
    $options['proxy_support'] = true; // only when the store really is behind a proxy or CDN
    return $options;
} );

Only switch proxy support on when there is a proxy in front: otherwise a script can send a made-up address in those headers and walk around the limit. A firewall rule at your CDN or host — a few checkout requests per minute per visitor — is a useful second layer, and covers the order-pay page too.

Add a challenge to the checkout

A CAPTCHA or an invisible bot challenge on the checkout makes each attempt cost the script more. Two things decide whether it actually helps:

  • It must be checked on the server, on the order request. Scripts often skip your checkout page and post straight to ?wc-ajax=checkout or the block checkout's /wp-json/wc/store/v1/checkout. A challenge that only lives in the page doesn't see them.
  • It must support your checkout. A plugin built for the classic checkout may not protect the block checkout, and the other way round. Check which one your store uses before choosing.

Test a real purchase on a phone after adding it: a challenge that fails for shoppers costs more than the attack.

Close the order-pay loophole

Every unpaid order has a payment page — /checkout/order-pay/… — that lets the customer retry. Testers reuse the page of a failed order to try card after card, each attempt adding a note to the same order. To limit it:

  • Cancel failed and stale unpaid orders during an attack, so their payment pages stop accepting attempts.
  • Keep WooCommerce's guest email check. Recent versions ask a visitor who isn't recognised to confirm the order's email address before showing the payment page. Don't switch it off with a filter or a plugin.
  • Rate-limit the order-pay address at your firewall, as with the checkout.

After the attack

  • Delete or trash the junk orders once refunds are done, so your reports aren't distorted.
  • Watch for disputes on the payments that succeeded, and answer them with the refund already issued.
  • Keep the rate limit and the gateway rules on. Testers come back to stores that were easy.
  • Check that the new measures haven't raised failures for real shoppers — compare payment failures per method with the weeks before.

Watching it in StorePilot

StorePilot doesn't block card testing — that is the job of your gateway, your firewall and the checks above. What it does is make an attack, and its aftermath, easy to see:

  • Every order with its status on the Orders tab, reported by the plugin from your store's server — including the ones the gateway declined.
  • Payment failures by method in Ecommerce → Overview: paid and declined attempts per payment method, and how many declined shoppers paid on the same site within 48 hours — useful for checking that your new protection isn't turning real buyers away.
  • Whether a browser was there. An order StorePilot couldn't tie to any visit says why — for example Visit not tracked, when the collector never ran in the buyer's browser and the order arrived through your server alone. One such order can be a shopper with a content blocker; a burst of failed orders like that is a hint they didn't come from people on your pages.

Install the WordPress plugin, see ecommerce analytics, or read about orders and their states in the docs.

FAQ

Questions about this guide

What is a card testing attack?

Someone with a list of stolen card numbers uses a store's checkout to find out which cards still work, usually with small payments and a script. The store is a tool, not the target — but it collects the failed orders, the gateway fees and disputes, and the risk of its payment account being restricted.

Why do card testers pick small WooCommerce stores?

A guest checkout, a cheap product and no limit on attempts make a store a quick way to check cards. Testers move on to stores that are easier; you don't need to be impossible to abuse, only slower and more expensive than the next one.

Should I refund or cancel the orders that went through?

Cancel and refund any payment that succeeded during an attack rather than shipping it: the real cardholder will likely dispute it. Ask your payment provider how it wants such orders handled — some prefer a refund, some a fraud report — and don't fulfil anything until you are sure the buyer is real.

Will a CAPTCHA on the checkout stop card testing?

It helps, provided it protects the request that creates the order, not just the visible form. Scripts often post straight to the checkout endpoint, so a CAPTCHA that is only checked in the browser can be skipped. Combine it with rate limits and your gateway's fraud rules.

See failed payments as they pile up

Install the plugin, and every order arrives with its status and payment method — and whether a real browser placed it.

Start for free

Every feature on the Free plan, for 100 visitors a month. No card required.

Choose a plan

Plans from €29 a month, priced by your monthly visitors and the websites you connect.