What Is a Card Testing Attack and How to Stop It

A card testing attack happens when automated bots use your online store's checkout form to test thousands of stolen credit card numbers.

A card testing attack happens when automated bots use your online store's checkout form to test thousands of stolen credit card numbers. Fraudsters submit small authorization requests to find out which stolen cards are active before making larger purchases elsewhere.

To stop a card testing attack immediately, you must enable rate limiting on your checkout API, implement modern CAPTCHA tools like Cloudflare Turnstile, and configure your payment gateway's velocity rules to block rapid sequential authorization failures.

How a Card Testing Attack Works Behind the Scenes

Card testing (also called carding or authorization testing) relies on automation. Cybercriminals purchase databases containing tens of thousands of leaked card primary account numbers (PANs) from dark web markets. These lists often lack accurate CVV codes, expiration dates, or billing postal codes.

To filter out dead cards, attackers target vulnerable e-commerce sites with automated scripts. The attack generally follows a specific pattern:

  • The bot targets a low-cost item or a custom donation field where any dollar amount (like $1.00 or $2.00) can be entered.

  • The script cycles through thousands of credit card combinations, submitting orders rapidly through your checkout API or standard frontend form.

  • The payment gateway returns immediate decline responses (such as Code 05: Do Not Honor or Code 51: Insufficient Funds) or success approvals.

  • The bot logs every successful transaction. The fraudster now has a validated list of active credit cards to sell or use for high-value fraud elsewhere.

Because the bot uses headless browsers or direct API calls, it can fire hundreds or even thousands of attempts within minutes if your checkout endpoints are completely open.

How a card testing attack works
  1. Bot finds an unprotected checkout
  2. Submits small charges with stolen cards
  3. Gateway returns approvals and declines
  4. Bot records the cards that work
  5. Fraudster uses or sells the valid cards

The Real Financial Damage of Card Testing

Many store owners assume card testing is harmless because most transactions fail or involve tiny dollar amounts. In reality, an unmitigated attack can severely damage your merchant account and cash flow within hours.

Authorization and Processing Fees

Depending on your pricing model, your processor and the card networks may charge for authorization attempts, including declined ones. Some flat-rate processors don't charge for declines, while interchange-plus and per-transaction pricing often does. Even a few cents per attempt across 20,000 attempts can turn into a painful bill, so check how your provider prices authorizations.

Authorization Rate Drop and Card Scheme Penalties

Card networks and processors watch authorization approval rates and fraud levels closely. Healthy online stores usually approve the large majority of genuine transactions, but during a card testing attack the approval rate can collapse because most attempts are declined. Processors such as Stripe, Adyen or PayPal may respond with risk reviews, held payouts, reserves or, in serious cases, account closure.

Subsequent Fraud Chargebacks

The few authorization attempts that actually succeed will trigger chargebacks once the legitimate cardholders spot the small unauthorized $1.00 charge on their bank statements. If these successful transactions lead to disputes, check your gateway logs immediately. For handling the operational side of disputes, see our guide on How to Win a Chargeback as a Merchant.

Check with your payment provider to review their specific authorization fee structure and high-risk threshold limits.

How to Spot Carding in Your Logs and Gateway Dashboard

Detecting an attack early minimizes financial impact. Look for sudden deviations from your normal traffic baseline.

Indicator Normal Store Traffic Card Testing Attack Traffic
Order Amount Varied catalog price points Uniform low values (e.g., $1.00) or cheapest item
Decline Rate 5% to 15% typical decline rate 80% to 95%+ decline rate across attempts
Checkout Velocity Your usual baseline for the time of day Tens or hundreds of requests per minute
Customer Data Matching names, emails, billing addresses Random strings (e.g., test1@asdf.com), mismatched postal codes
IP Address Spikes Distributed residential IPs Single IP, tight CIDR block, or known VPN/datacenter exit nodes

In your payment gateway dashboard (such as Stripe Dashboard, Braintree Control Panel, or WooCommerce payment logs), you will see hundreds of declined transactions originating from the same session or IP address within seconds.

Immediate Emergency Actions to Stop an Active Attack

If your store is currently undergoing a card testing attack, take these steps immediately to mitigate the damage:

  1. Enable Bot Mitigation on Checkout: Immediately turn on invisible CAPTCHA, reCAPTCHA v3, or Cloudflare Turnstile on your checkout page and payment forms.

  2. Set Gateway Velocity Rules: Log into your payment gateway dashboard and turn on velocity controls. Set rules to block any IP address or device fingerprint that triggers more than 3 to 5 card declines within 10 minutes.

  3. Disable Custom Amount / Donation Fields: If attackers are using a flexible price input field, remove the field or set a minimum charge threshold (e.g., $10.00).

  4. Require User Accounts or Email Verification: Temporarily disable guest checkout if your platform allows it, forcing users to confirm their email address before hitting the payment page.

  5. Block Threat IPs at the WAF Level: Use a Web Application Firewall (WAF) like Cloudflare, AWS WAF, or Sucuri to block traffic from datacenter providers (ASNs) like DigitalOcean, AWS, or Hetzner if your store sells exclusively to direct consumers.

Long-Term Engineering Defenses Against Card Testing

Stopping card testing permanently requires defensive layering at the network, application, and gateway levels.

Implement 3D Secure (3DS2)

Enforcing 3D Secure lets the cardholder's issuing bank assess each transaction. When the issuer sees risk, it asks for a challenge, such as approving the payment in the banking app or entering a one-time passcode. Bots generally cannot complete a challenge, so testing scripts fail. Keep in mind that 3DS2 can also approve low-risk transactions without a challenge (the frictionless flow), so combine it with the other defenses below.

Note that while 3D Secure provides a liability shift for fraud-coded chargebacks (such as Visa Reason Code 10.4), it is not an absolute guarantee against non-fraud disputes like item-not-received claims, nor does it eliminate gateway authorization fees for failed attempts.

Rate Limit Checkout APIs

Never expose an unthrottled endpoint that processes payments. Set strict rate limits on your backend web application servers:

  • Per-IP Limits: Limit POST requests to /api/checkout or /checkout/pay to 3 requests per minute per IP address.

  • Per-Session/Token Limits: Throttle authorization calls tied to specific user sessions or guest tokens.

Gateway Address Verification (AVS) and CVV Checks

Configure your gateway settings to hard-decline any authorization attempt where the CVV or Address Verification System (AVS) postal code check fails. While this does not prevent the initial authorization attempt from occurring, strictly refusing secondary authorization retries discourages automated bot scripts from continuing to hit your endpoint.

Frequently asked questions

Why do card testers target my site instead of big retailers?

Attackers target small and mid-sized e-commerce sites because they often lack enterprise Web Application Firewalls, rate-limiting rules, or CAPTCHAs on checkout forms. Automated scripts scan thousands of sites for unprotected payment endpoints.

Will 3D Secure completely prevent card testing attacks?

No. 3D Secure makes it much harder for bots to complete fraudulent payments when the issuer asks for a challenge, but it does not stop the attempts themselves. Depending on your setup, authentication requests and authorizations can still create fees, so pair 3DS with rate limiting, bot protection and velocity rules.

Does my payment gateway refund authorization fees caused by card testing?

Usually not. Many providers pass on network and authorization fees for every attempt, whatever the outcome. Contact your provider during an incident and ask whether they offer any fee relief; some will help if you can show it was an attack.

About this guide. Written by The PayDecoded Team and checked against our editorial policy. It is general information, not financial or legal advice. Fees, limits and network rules change and vary by provider and country, so confirm details with your payment provider. Spotted an error? Tell us.