Card Testing Attack: Signs and How to Stop It

A card testing attack is a bot using your checkout to find which stolen card numbers still work. Signs: failed payments spike, 402 errors, tiny charges with nonsense names. Stop it with CAPTCHA and rate limits.

Updated

A card testing attack is a script that uses your checkout, or your card-save form, to check which stolen card numbers still work. Stripe: “someone tries to determine whether stolen card information is valid so that they can use it to make purchases” (Stripe docs).

How it works

Testers use both card setup and payments. Card setup is preferred, because validations during setup “don’t typically show up on cardholder statements”. Payments are small, so cardholders are less likely to notice. Scripts test many numbers at once. Valid cards are then used on shops or resold.

Signs

  • A spike in failed or blocked payments.
  • A spike in requests with 402 errors, in particular the outcome generic_decline.
  • Suspicious payments with low amounts and nonsensical names and emails.

Same list as Stripe’s. On other processors, look at the same things: decline rate, error codes, tiny amounts.

What it costs you

cost how
disputes some payments succeed; owners report them, you get early fraud warnings and disputes
higher decline rate issuers and networks see you as riskier, and real payments may fail too
fees authorization and dispute fees
load many requests strain your servers
bad data test traffic looks like new customers
monitoring programs large amounts of disputes can put you on card network monitoring lists

Stop it

Stripe’s controls, for the endpoints testers hit: save card and make payment.

  1. CAPTCHA, checked on the server on every request that validates a card or pays.
  2. Limit access to the payment form: require login or session checks before payment. CSRF tokens help with some types.
  3. Rate limits: for example a cap on new customers per IP per day, plus limits on cards per account and purchases of the same product.
  4. Watch for odd behavior: filter requests with certain user agents or other parameters.
  5. Keep your keys safe. Testers can use a publishable key to retry payments, or a leaked secret key to create them.
  6. Combine them. No single filter holds.

If you use a plugin or platform, these usually need code changes: show the page to the developer or vendor.

Is it a bot problem

Yes. Card testers are bots posting to your checkout. Check what your site lets in: anti-bot detector. For card networks, repeated testing can end up in chargeback programs: Mastercard excessive chargeback program.

Fake form submissions · Invalid traffic · Bot traffic

Questions

What is a card testing attack?

Stripe: someone tries to determine whether stolen card information is valid so they can use it to make purchases. Other names: carding, account testing, enumeration, card checking.

How do I know I am under a card testing attack?

A significant increase in failed authorizations and payments. Stripe lists a spike in failed or blocked payments, a spike in 402 errors, and suspicious payments with low amounts and nonsensical names and emails.

Why is card testing bad if the payments fail?

Some succeed, and cardholders report them as fraud. A high decline rate can hurt your standing with issuers and card networks, and you can pay extra fees. Stripe adds that large amounts can enlist you in card monitoring programs.

Do IP blocks stop card testing?

Not alone. Stripe says card testers use many techniques, so simple firewall rules or filters on a single heuristic such as IP address are usually not enough.

What do I do first when it is happening?

Stripe's checklist: identify the activity, refund the fraudulent payments to avoid disputes, add mitigations, and monitor that they work.