Last updated
Important Disclaimer
- These numbers are for software testing ONLY
- They cannot be used for real purchases — they are not assigned to real accounts
- Using fake card numbers to attempt real transactions is fraud
- For payment processor testing, use the processor's official sandbox environment
- Never use real card numbers in development or test environments (PCI DSS requirement)
- Generated numbers pass Luhn validation but will be declined by real payment processors
Examples
Example 1: Generated Test Card Numbers by Network
Visa (starts with 4, 16 digits):
4532 1234 5678 9012 Exp: 12/27 CVV: 123
4916 8765 4321 0987 Exp: 08/26 CVV: 456
4111 1111 1111 1111 Exp: 03/28 CVV: 789
Mastercard (starts with 51-55 or 2221-2720, 16 digits):
5412 3456 7890 1234 Exp: 11/27 CVV: 321
5500 0055 5555 5559 Exp: 06/26 CVV: 654
2221 0000 0000 0009 Exp: 09/28 CVV: 987
American Express (starts with 34 or 37, 15 digits):
3714 496353 98431 Exp: 07/27 CVV: 1234
3782 822463 10005 Exp: 04/26 CVV: 5678
Discover (starts with 6011, 16 digits):
6011 1111 1111 1117 Exp: 10/27 CVV: 111
6011 0009 9013 9424 Exp: 05/26 CVV: 222
Example 2: Luhn Algorithm Validation
How the Luhn check works for 4532 1234 5678 9012:
Step 1: Double every second digit from right:
4 5 3 2 1 2 3 4 5 6 7 8 9 0 1 2
4 10 3 4 1 4 3 8 5 12 7 16 9 0 1 4
Step 2: Sum digits of doubled values > 9:
10 → 1+0 = 1
12 → 1+2 = 3
16 → 1+6 = 7
Step 3: Sum all values:
4+1+3+4+1+4+3+8+5+3+7+7+9+0+1+4 = 64
Step 4: Check if divisible by 10:
64 % 10 = 4 ≠ 0 → invalid (this is a demo)
Valid card: sum must end in 0.
The generator ensures all produced numbers pass this check.
Example 3: Official Test Cards for Payment Processors
Stripe test cards:
Success: 4242 4242 4242 4242 CVV: any Exp: any future
Declined: 4000 0000 0000 0002
Insufficient funds: 4000 0000 0000 9995
Expired card: 4000 0000 0000 0069
Incorrect CVV: 4000 0000 0000 0127
3D Secure: 4000 0025 0000 3155
Braintree test cards:
Visa success: 4111 1111 1111 1111
Mastercard: 5500 0055 5555 5559
Amex: 3782 822463 10005
Declined: 4000 1111 1111 1115
PayPal sandbox:
Use PayPal sandbox account credentials
(not card numbers) for PayPal-specific testing