What is card testing?

Basic4 min readUpdated

GET /learn/ecommerce-fraud/what-is-card-testing/ Accept text/html text/markdown

Short answer

Card testing is a fraud attack in which scripts submit stolen or guessed card details to a payment or add-card form, usually with tiny or zero-value amounts, to learn which cards work. Working cards are then used for larger purchases elsewhere or resold. The merchant whose form is used pays through authorisation fees, disputes and a higher decline rate.

A card tester uses your payment form for one thing: its answer. Approved means the card is live, and a live card is worth more to the tester than anything in your store. Stripe's card testing guide lists the other names the attack goes by: carding, account testing, enumeration and card checking.

How does card testing work?

The attacker starts with a list of card details, either stolen or generated. A script, usually running through residential proxies or a botnet so each attempt comes from a different IP address, submits each card to a payment endpoint that answers quickly and asks for little else. It records the response and moves to the next card. Cards that pass are kept for larger purchases at other merchants or resold as "checked" cards.

Stripe notes that testers use two kinds of request. Card setup, where a card is saved to an account, is popular because the checks behind it usually do not appear on the cardholder's statement. Small payments are the other kind, because cardholders are less likely to notice and report them.

Enumeration vs validation of stolen cards

The OWASP automated threats list separates two attacks that both get called card testing:

  • Carding (OAT-001) checks whether complete stolen card records still work. The attacker has the number, expiry date and security code and only needs a yes or no.
  • Card cracking (OAT-010) guesses the missing parts, such as the expiry date or security code, by trying different values against the same number.

Enumeration is the wider name for guessing. Every card number starts with a BIN (bank identification number, the first six to eight digits that identify the issuer), so an attacker who knows one valid BIN can generate numbers in that range and try them with many expiry dates and codes. Visa describes enumeration as "a rapid, brute force card testing attack at scale".

The two look different in your logs. Validation shows many distinct card numbers with one or two attempts each, often with full billing details copied from the stolen record. Enumeration shows the same card number or the same BIN again and again, with the expiry or security code changing between attempts and a high share of "incorrect CVC" and "expired card" declines.

Why small and zero-value payments are the target

A zero-value authorisation is the card check a processor runs when a card is saved without a charge. Together with very small payments, it gives the tester an answer while the cardholder sees little or nothing. The usual targets are:

  • donation forms that let the payer choose any amount
  • add-card and update-payment-method pages, especially when reachable without logging in or right after an automated signup
  • free trials that ask for a card
  • cheap digital goods with instant delivery and guest checkout
  • mobile app or partner APIs that call the processor without the protections your web checkout has

What card testing costs the merchant

The tester takes the card data and leaves you with the bill:

  • Depending on your pricing plan, your processor may charge a fee for each authorisation attempt, declined ones included.
  • Some test charges succeed. Cardholders notice them and report fraud, and each dispute brings a fee on top of the reversed amount.
  • Issuers see many declines from your merchant account and grow stricter with all your payments, so real customers get declined too. Stripe warns this can last after the attack ends.
  • A processor that sees an attack running on your account may review it, hold payouts, ask for changes or close the account. Visa's Acquirer Monitoring Program includes criteria based on the number of enumerated authorisation transactions and the enumeration rate, so attempts can count against a merchant even when they are declined.
  • Large numbers of fake customers and orders slow your systems and distort your revenue and conversion reports.

Signs your site is being used for card testing

  • A spike in failed payments or HTTP 402 errors from your payment API. On Stripe, many show the decline code generic_decline.
  • Bursts of low-value payments or card saves within minutes, often at hours when real customers are quiet.
  • Customer names and emails that are random strings, or one name used with many different cards.
  • Many cards per IP address, device, session or account.
  • New accounts that add a card and never buy anything.
  • The same BIN appearing far more often than usual, with only the last four digits changing.

If you see two or more of these together, treat it as an active attack. The steps are in how to stop card testing, and the OWASP automated threats overview covers the related bot attacks on payment and account flows.

Common questions

What is card testing without an order?

It means authorisations or card checks show up in your processor dashboard with no matching order in your store. The attacker is calling a payment, card setup or add-card endpoint directly, or using a leaked API key, so your shop logic never runs. Find every endpoint that can create a payment or save a card without a cart, and rotate any key that may have leaked.

Is card testing done by bots?

Almost always. The attack only pays off at volume, so it runs from scripts or automated browsers, usually spread across many proxy IP addresses to stay under simple per-IP limits. That is why bot detection on the payment step is one of the main defences.

Can card testing happen on Stripe, PayPal or Shopify stores?

Yes. Any form that returns an approved or declined answer can be used, whatever the processor. Processors run their own card testing defences on their hosted checkouts, but endpoints you build yourself, such as a custom donation form or an add-card page, need your own limits.