WooCommerce

Card Testing Attacks on WooCommerce: How to Spot Them and Stop Them

Card Testing Attacks on WooCommerce: How to Spot Them and Stop Them

One morning a client sent me a screenshot of their WooCommerce orders screen. Overnight, around 400 new orders had appeared, almost all for the cheapest product in the store, almost all with failed payments, each from a different name and address. A few dozen had succeeded. Their payment gateway had also sent an email warning about unusual activity on the account. The store had become the target of card testing attacks, and they’re far more common than most store owners realise.

Card testing, sometimes called carding, is when criminals use your checkout to check whether stolen card numbers work. They don’t want your products. They want to know which cards are live so they can use them elsewhere or sell them. Your store pays the price in gateway fees, disputes, damaged gateway standing and a database full of junk orders. This article explains how card testing works, what to do immediately when it happens and how to make your checkout an unattractive target.

How card testing works

Criminals buy large lists of stolen card details. Many of those cards have been cancelled or blocked, so the lists are only valuable once tested. Making a small purchase on a real store is a reliable test: if the payment succeeds, the card is live.

They look for stores where:

  • Checkout can be submitted automatically by scripts, with no bot protection
  • Low-priced products exist, so tests attract little attention
  • Guest checkout is allowed, so no account is needed
  • The payment gateway returns clear success or failure responses
  • Nothing limits how many attempts come from one source

A bot then runs through hundreds or thousands of cards, often rotating IP addresses, names and addresses to avoid simple blocks. Attacks frequently happen at night in the store’s timezone, when nobody is watching.

The cost to your store

Even though the criminals don’t get your products, you’re still affected:

  • Transaction fees. Some gateways charge for each authorisation attempt or each successful charge, which adds up quickly.
  • Refunds and disputes. Successful test charges are made on stolen cards. The real cardholders dispute them, and you pay dispute fees on top of losing the money.
  • Gateway penalties. High decline rates and disputes can cause your gateway to restrict, hold funds or close your account.
  • Database bloat. Hundreds of failed orders and fake customer records clutter your store.
  • Email reputation. Order confirmation emails sent to fake addresses can damage your sender reputation.
  • Stock problems. Successful test orders may reduce inventory for real products.

Signs you’re under attack

Watch for:

  • A sudden surge in orders, especially failed or pending ones
  • Many orders for the same low-priced product
  • Different names, emails and addresses on each order, often obviously fake
  • Many failed payment attempts in your gateway dashboard
  • Orders arriving in rapid succession, seconds apart
  • Mismatched billing countries and IP locations
  • Gateway notifications about elevated decline rates

Card testing attacks can also happen without creating visible orders, when bots call payment endpoints directly. Check your gateway dashboard as well as WooCommerce.

What to do in the first hour

If an attack is happening right now, act quickly to limit the damage:

  1. Enable bot protection on checkout immediately. If your gateway or a plugin offers a CAPTCHA or Turnstile option for checkout, turn it on.
  2. Temporarily disable guest checkout if your store can operate that way for a day or two.
  3. Add a firewall or CDN rule to challenge or rate limit requests to checkout and payment endpoints. In Cloudflare, a managed challenge on /checkout/ and the wc-ajax checkout endpoint stops most automated attempts.
  4. Raise the minimum order value temporarily, or hide very low-priced products, which are favourite test targets.
  5. Contact your payment gateway. Tell them you’re under attack. They may apply extra protections and will note that you responded.
  6. Refund any successful fraudulent orders promptly, before disputes arrive. Refunding quickly can prevent chargebacks and their fees.

In severe cases, pausing card payments for a short time is better than letting the attack continue.

Lasting defences

Once the immediate attack is under control, put permanent protections in place.

Use the gateway’s fraud tools

Most major gateways include fraud screening. Stripe Radar, for example, scores each payment for risk and lets you write rules, such as blocking payments where the card’s country doesn’t match the billing country, or reviewing payments above a risk threshold. PayPal, Razorpay and others have their own tools. Learn what yours offers and configure it.

Make sure you’re using the gateway’s current WooCommerce plugin and integration method. Modern integrations often include card testing protections that older ones lack.

Add bot protection to checkout

Invisible challenges such as Cloudflare Turnstile, reCAPTCHA v3 or hCaptcha can be added to WooCommerce checkout through plugins or, in some cases, through the gateway itself. Configure them to protect both the classic and block checkout if you use either, and the order-pay page, which bots sometimes target directly.

Rate limit checkout and payment endpoints

Limit how many checkout attempts can come from a single IP address in a short time. This can be done at the CDN, in a web application firewall or with server rules. WooCommerce itself has added rate limiting options for some Store API endpoints used by the block checkout, which can be enabled with a filter or setting depending on version.

Protect the order-pay and add-payment-method pages

Bots sometimes skip checkout and use the “pay for order” page or the “add payment method” page in My Account, which can also validate cards. Make sure bot protection and rate limiting cover these too. If customers don’t need to save cards, consider disabling the add payment method feature.

Require accounts or verification where appropriate

For stores where it makes business sense, requiring an account or email verification before checkout makes automated attacks much harder. Weigh this against conversion, because it adds friction for genuine customers.

Remove ultra-cheap products

Products priced at a few rupees or under a dollar are prime targets. If they exist for legitimate reasons, such as samples, consider requiring a minimum cart value or restricting them to logged-in customers.

Monitor and alert

Set up alerts for:

  • More than a certain number of failed orders per hour
  • A spike in orders for a single product
  • Gateway decline rate warnings

Some fraud and security plugins provide these alerts. Even a simple daily report of failed orders helps you notice attacks early.

Cleaning up afterwards

After an attack:

  • Refund any successful fraudulent payments that haven’t been disputed.
  • Cancel and delete the fake orders, after recording key details for your gateway if they ask.
  • Delete fake customer accounts created during the attack.
  • Restore stock levels if test orders reduced inventory.
  • Review email logs for bounces from fake addresses.

Document the incident: when it started, how it was detected, what you did and what protections you added. If it happens again, you’ll respond faster.

Why your gateway relationship matters

Payment gateways monitor every merchant’s decline rate, dispute rate and fraud signals. A store that suffers repeated card testing attacks without responding can be flagged as high risk, which leads to rolling reserves, delayed payouts or account closure. In some cases, gateways also report merchants with excessive fraud to card network monitoring programmes, which carry their own fees.

The best protection for that relationship is communication and quick action. When you notice an attack, contact the gateway, explain what you’ve done to stop it and ask whether they can see anything you can’t. Keep a record of the incident. Gateways treat merchants who respond quickly and put protections in place very differently from those who ignore warnings.

Testing your defences

Once protections are in place, check them. On a staging site using the gateway’s test mode, try submitting the checkout repeatedly with test cards and confirm that rate limiting kicks in and bot protection appears where expected. Check the order-pay page and the add payment method page too. Then confirm that a normal customer can still check out smoothly on mobile, including with express payment buttons. Security that blocks real customers is a problem of its own.

A note on subscription stores

Stores selling subscriptions are attractive to card testers because the add payment method flow and the initial trial or sign-up can validate cards cheaply, sometimes with zero-value authorisations. Pay particular attention to free trials and ₹0 or $0 sign-ups, and consider requiring email verification before a trial starts.

Frequently asked questions

Why was my small store targeted?

Small stores are often targeted precisely because they have fewer protections and nobody monitoring overnight. Size doesn’t make a store safe.

Will I be liable for the stolen card charges?

In card-not-present transactions, merchants usually bear the cost of disputes. That’s why refunding fraudulent successful charges quickly is important.

Does a CAPTCHA hurt checkout conversion?

Visible puzzles can. Invisible challenges like Turnstile or reCAPTCHA v3 rarely affect genuine customers and are a good balance.

Can card testing happen through my REST API?

Yes. Bots can target the Store API endpoints used by the block checkout. Rate limiting and bot protection should cover those endpoints too.