How to stop card testing attacks on WooCommerce
You open your store in the morning and find hundreds of new orders. Almost all of them failed. Most are for your cheapest product, many use strange names and email addresses, and they came in a few seconds apart.
That is a card testing attack. It is one of the most common problems WooCommerce stores face, and it costs real money even though no order ever ships.
This guide explains what card testing is, how to recognise it, and the steps that actually stop it.
What is card testing?
Criminals buy lists of stolen card numbers. Before they use or sell them, they want to know which cards still work. The easiest way is to try a small payment on a real online store. Your checkout becomes their free card checker.
A bot sends one order after another, each with a different card. Most fail. The few that succeed tell the attacker which cards are live.
Why it hurts your store
- Gateway fees. Many payment providers charge for every attempt, including failed ones.
- Account risk. A sudden wave of declines looks bad to your payment provider. Stores have had their accounts reviewed, limited or closed after an attack.
- Chargebacks. When a stolen card does go through, the real owner disputes it later and you pay the dispute fee.
- A messy order list. Thousands of failed orders hide your real orders and slow down your admin.
How to tell it is card testing
Look for these signs together:
- Many orders in a short time, often at night.
- Most of them have the status Failed or Pending payment.
- The same low-priced product again and again.
- Random or made up names, emails and addresses.
- Orders coming from a small number of IP addresses, or from many addresses in the same range.
- Guest orders, never from logged in customers who bought before.
If you see this pattern, act the same day. Attacks often come back.
Why a CAPTCHA usually does not help
Most card testing bots never open your checkout page. They send their requests straight to WooCommerce, for example to the block checkout's Store API or the classic checkout endpoint. A CAPTCHA widget on the page is never shown to them, so it never gets a chance to stop them.
A CAPTCHA also adds work for every real customer and can lower your sales. The better approach is to check each order request at the server, where the bot actually arrives.
Step 1: Turn on the protection your gateway already has
Start with what you already pay for:
- Stripe and WooPayments: check your fraud tools (Stripe Radar) and block payments that fail the CVC or postcode check.
- PayPal, Square, Braintree, Authorize.net: look for velocity limits, address checks and fraud filters in your gateway dashboard.
- Ask your provider's support if they see an attack. They can often block it on their side too.
Step 2: Limit how fast orders can be placed
Bots need speed. Limits slow them down:
- If you use Cloudflare, add a rate limit or a firewall rule for your checkout and Store API URLs.
- WooCommerce has optional rate limiting for its Store API that a developer can switch on.
- Block repeated failed payments from the same IP address for a while.
Step 3: Check every order request at the server
This is the step that stops bots that skip your page. The idea is simple: a real shopper's browser loads your store before it places an order. A bot that sends a request directly has never loaded anything.
OrderWarden, our free plugin, works this way. When a real shopper opens your store, their browser quietly receives a short-lived signed token. The token travels with the order. A request without a valid token is turned away before WooCommerce creates an order or contacts your payment gateway. Shoppers see nothing and solve nothing.
It covers the classic checkout, the block checkout, the Pay for order page and express payment buttons, and it works with every payment gateway.
Get OrderWarden free on WordPress.org
Step 4: Clean up after an attack
Do not delete thousands of orders by hand. Large deletes can time out and leave your store half cleaned. Use a tool that removes failed orders in small batches in the background. OrderWarden includes a one click cleanup that does this.
After cleaning up:
- Check your payment provider for any test payments that went through and refund them before they turn into chargebacks.
- Look at your gateway fees for the attack period.
- Keep an eye on the next few nights. Attackers often try again.
Quick checklist
- Gateway fraud tools and CVC and postcode checks are on.
- Rate limits are set for checkout.
- Every order request is checked at the server.
- Failed orders are cleaned up in batches.
- You get an alert when an attack starts, so you are not surprised the next morning.
Questions
Can card testing happen on a small store? Yes. Bots look for any working checkout. Small stores are often targeted because they have fewer protections.
Will these steps block real customers? They should not. Checking a token at the server is invisible to shoppers, and OrderWarden only protects a checkout type after it has seen one genuine order through it, so a theme or cache problem never turns real customers away.
Do I need to pay for protection? No. The protection itself is free in OrderWarden. The Pro add-on adds automatic bans, instant alerts to Slack, Discord or Telegram, and attack reports for stores that want them.