Card testing is fraud aimed at your checkout rather than your products. Someone holding a list of stolen card numbers uses your payment form to find out which ones still work, usually with a script that submits hundreds or thousands of small orders. The cards that pass are sold or used elsewhere. You are left with a pile of failed orders, a handful of small charges that will turn into disputes, and reports that no longer describe your business.
WooCommerce’s own guide puts it plainly: the most common sign is a large increase in the number of orders being assigned the Failed status, and those orders do not represent missed sales. Most advice stops at blocking the attack. This guide is about the data: how to detect an attack from your orders, how to keep it out of your metrics, and how to put a number on what it cost.
Why it matters beyond the failed orders
Card networks now count card testing against the merchant. Visa’s Acquirer Monitoring Program tracks an enumeration ratio alongside its fraud and dispute ratio; merchants with more than 300,000 enumerated transactions in a month and an enumeration ratio of 20 percent or more can be pulled into the program. Most small stores will never reach that volume, but acquirers watch decline rates well below network thresholds, and a sustained attack can get an account restricted. Stripe also warns that card testing can lead to early fraud warnings, disputes and enrolment in card monitoring programs, and recommends refunding fraudulent payments that succeeded.
Attacks are also getting larger. OOPSpam, which makes an anti-spam plugin for WooCommerce, described blocking more than 450,000 card testing attempts in a single week across stores it protects, against PayPal and card processors on both classic and block-based checkouts.
What an attack looks like in order data
The burst of failed orders is the obvious part. The other signals help you separate an attack from a real payment outage, where failures rise but the orders themselves look normal.
| Signal | Card testing | Gateway outage |
|---|---|---|
| Failed orders per hour | Many times normal, often overnight | Up, in line with normal traffic |
| Order totals | Small, often the cheapest product | Normal basket mix |
| Customers | Many new guest emails and names, few repeats | Your usual mix, including returning customers |
| Order attribution origin | Often “Unknown”, with no device type | Normal sources |
| Session page views | Identical low counts across orders | Varied |
| Gateway decline reasons | Generic declines, invalid numbers, wrong CVC | Timeouts, processing errors |
The attribution clues are worth explaining. WooCommerce records an origin, device type and the number of page views in the session for each order, captured by JavaScript in the shopper’s browser. Scripts that post straight to the checkout endpoint skip that browser step, so their orders arrive with origin “Unknown”. In the attack OOPSpam described, many orders had exactly that, and many showed identical session page view counts, a strong sign of automation.
Detect it with an hourly query
Most stores find out about an attack from the gateway, an angry email or the orders screen the next morning. An hourly check against your own baseline catches it within the hour. On WooCommerce with High-Performance Order Storage, orders live in wc_orders and attribution data in wc_orders_meta:
-- Hourly paid vs failed orders, with card-testing indicators (last 14 days)
SELECT DATE_FORMAT(o.date_created_gmt, '%Y-%m-%d %H:00') AS hour_gmt,
SUM(o.status IN ('wc-processing', 'wc-completed')) AS paid,
SUM(o.status = 'wc-failed') AS failed,
SUM(o.status = 'wc-failed' AND m.meta_value IS NULL) AS failed_no_origin,
COUNT(DISTINCT o.billing_email) AS distinct_emails,
ROUND(AVG(o.total_amount), 2) AS avg_total
FROM wp_wc_orders o
LEFT JOIN wp_wc_orders_meta m
ON m.order_id = o.id
AND m.meta_key = '_wc_order_attribution_source_type'
WHERE o.type = 'shop_order'
AND o.date_created_gmt >= UTC_TIMESTAMP() - INTERVAL 14 DAY
GROUP BY hour_gmt
ORDER BY hour_gmt;
Turn the output into an alert with two simple rules: flag any hour where failed orders exceed both 10 and five times the median hourly failures of the previous two weeks, or where failed orders are more than half of all orders. Add a third check per customer, matching the starting point in WooCommerce’s anti-fraud documentation, which treats three or more orders from one customer within an hour as a velocity signal worth a high weight. Tune all three against your own history; a store that runs flash sales needs looser limits than one with steady traffic.
Magento varies more by payment integration. Some create a cancelled order for every failed payment, others leave nothing in sales_order and only a record at the gateway. Start from the gateway’s decline report and match it to orders where you can.
Keep attack orders out of your reports
Do not delete the orders straight away. They are evidence for your gateway and your host, and deleting thousands of rows during an attack adds load. Tag them instead, with an order note, a custom meta key such as _card_test = 1 or a dedicated status, then exclude the tag everywhere it would distort a number:
| Metric | How an attack distorts it | Fix |
|---|---|---|
| Payment success rate | Collapses for the attack window | Exclude tagged orders; report attacks as a separate line |
| New customers | Guest orders create customer records in wc_customer_lookup | Exclude customers whose only orders are tagged |
| Checkout or order conversion rate | Inflated if you count created orders, deflated if you count failures | Count paid orders from untagged sessions only |
| Average order value and product mix | Pulled toward the cheap product the bots used | Use paid, untagged orders |
| Email list and deliverability | Failed-order emails go to stolen or invented addresses, causing bounces and complaints | Suppress tagged addresses from all lists |
| Cohort and repeat-rate reports | Thousands of one-order customers who never return | Drop tagged customers from cohort tables |
Bots that skip the browser do not show up in GA4 at all, so your analytics and your order table will disagree for the attack period. That is one more entry for the reconciliation routine in our guide to matching GA4 revenue to WooCommerce and Magento orders. Bots that do load pages are a separate problem, covered in our post on bot traffic and conversion rate.
Count what the attack cost
A post-incident cost estimate is useful twice: it tells you how much prevention is worth, and it is the evidence you need when asking a gateway to waive fees. The lines below cover most of it. Use your own gateway’s fee schedule; the example is illustrative.
| Cost line | How to measure it | Example: 4,000 attempts |
|---|---|---|
| Authorisation fees on declined attempts | Attempts multiplied by your gateway’s per-attempt fee, if it charges one | 4,000 at $0.10 = $400 |
| Successful test charges | Refund them quickly; count processing fees that are not returned | 40 charges, $12 in fees |
| Disputes and fraud warnings | Disputes on test charges you did not refund in time, plus dispute fees | 8 at $15 = $120 |
| Staff time | Hours spent investigating, cleaning up and answering emails | 6 hours |
| Hosting and performance | Extra load during the attack; slower checkout for real shoppers | Check paid orders in the attack window against the usual level |
| Account risk | Decline rate seen by your acquirer during the attack | Record the peak hourly decline rate |
Prevention, briefly
Prevention works in layers, and the earliest layers matter most because a declined card still leaves a failed order behind once the order exists. The usual stack for WooCommerce is a CAPTCHA or Cloudflare Turnstile on checkout, rate limits on the Store API checkout endpoint, a rule that blocks orders with no attribution origin (the control OOPSpam credits with stopping its largest attack), velocity checks, and the gateway’s own fraud screening at the end. Stripe’s guidance adds rate limits per IP address and requiring session validation for sensitive actions.
Whatever you install, keep the hourly query running. Attackers change tactics, and the failed-order count is the one signal they cannot hide, because a declined card is the whole point of the exercise.
Sources
- WooCommerce, How do I prevent and respond to card testing attacks?
- WooCommerce, Anti-Fraud Protection for WooCommerce documentation
- WooCommerce, Order Attribution Tracking
- OOPSpam, Defending WooCommerce: How we blocked 450,000 card testing attempts in one week
- Stripe, Protect yourself from card testing
- Chargeflow, Visa Acquirer Monitoring Program (VAMP)


