Payment test data that passes validation
A payment form validates in layers: length, brand prefix, checksum, then expiry or country rules. Test data that fails the first layer never exercises the rest. Every identifier in this category is built to pass the checks a validator can run offline, so the code that runs after validation — formatting, masking, storage, error handling — gets tested too.
| Generator | Check it passes |
|---|---|
| Credit card numbers | Brand prefix, length and the Luhn checksum, for Visa, Mastercard (51–55 and 2221–2720), Amex, Discover, JCB and Diners |
| IBAN & SWIFT | ISO 13616 mod-97, plus national check digits for Belgium, France, Italy, Portugal and Spain |
| Bank routing numbers | ABA 3-7-1 checksum with a valid Federal Reserve prefix; UK sort codes, Canadian transit numbers, Australian BSBs |
| Barcode & SKU numbers | GTIN check digit for UPC-A, EAN-13 and EAN-8; ISBN-10 and ISBN-13 |
Sandbox cards versus generated cards
Generated numbers are right for front-end validation, database fixtures and anything that never touches a processor. When a test does reach Stripe, Adyen, Braintree or PayPal, use that processor's published test cards instead — only those trigger specific outcomes such as a 3-D Secure challenge or an insufficient-funds decline. The guide Test credit card numbers lists both and explains when each one belongs in a test.
Retail and accounting data
For storefronts and back offices, the product catalog, price & currency, invoice and transaction log generators produce records that behave like real ones: invoice subtotals, tax and totals add up; prices can use charm endings and integer minor units the way payment APIs expect; transaction logs mix successes, failures, refunds and chargebacks at a rate you set. That matters more than it sounds — a fixture whose numbers do not reconcile tends to hide exactly the rounding bugs it was meant to find.
None of these numbers is attached to a real account. A generated card or IBAN passes the checksum and is then declined by the network, because no issuer has it on file.