Introduction to Test Cards for Multiple Payment Platforms #
When developing and testing payment integrations, using real credit card information poses significant security and financial risks. Payment platforms provide Test card numbers that simulate various payment scenarios without processing actual transactions. This comprehensive guide covers Test card credentials for major payment processors including Stripe, PayPal, Square, Braintree, Authorize.Net, and Adyen.
Test cards allow developers to verify payment flows, error handling, fraud detection, and edge cases in sandbox environments before deploying to production. Each platform implements Test modes differently, but all share the common goal of providing safe, realistic testing environments.
Stripe Test Cards #
Stripe provides an extensive library of Test card numbers that simulate successful payments, declines, errors, and specific card behaviors. These cards only work in Test mode, identified by API keys beginning with pk_test_ or sk_test_.
Basic Test Card Information #
When using Stripe Test cards, you can use any future expiration date, any three-digit CVC code, and any billing Address ZIP or postal code. The card number itself determines the Test scenario outcome.
Successful Payment Test Cards #
| Card Number | Brand | Description |
|---|---|---|
4242424242424242 | Visa | Standard successful charge |
4000056655665556 | Visa (debit) | Successful debit card charge |
5555555555554444 | Mastercard | Standard successful charge |
2223003122003222 | Mastercard (2-series) | Successful charge with New Mastercard range |
5200828282828210 | Mastercard (debit) | Successful debit card charge |
378282246310005 | American Express | Standard successful charge |
6011111111111117 | Discover | Standard successful charge |
3056930009020004 | Diners Club | Standard successful charge |
3566002020360505 | JCB | Standard successful charge |
Declined Payment Test Cards #
| Card Number | Decline Code | Description |
|---|---|---|
4000000000000002 | card_declined | Generic decline |
4000000000009995 | insufficient_funds | Insufficient funds in account |
4000000000009987 | lost_card | Card reported as lost |
4000000000009979 | stolen_card | Card reported as stolen |
4000000000000069 | expired_card | Expired card |
4000000000000127 | incorrect_cvc | CVC verification failed |
4000000000000119 | processing_error | Processing error occurred |
3D Secure Authentication Test Cards #
Stripe provides Test cards to simulate Strong Customer Authentication (SCA) requirements under regulations like PSD2. These cards trigger authentication flows during checkout.
| Card Number | Authentication Behavior |
|---|---|
4000002500003155 | Always requires authentication and succeeds |
4000002760003184 | Requires authentication and authentication fails |
4000008260003178 | Requires authentication but card does not support 3D Secure |
4000000000003220 | 3D Secure 2 authentication must be completed |
Example: Using Stripe Test Cards in Code #
// Stripe.js integration example
const stripe = Stripe('pk_test_YOUR_TEST_KEY');
const cardElement = elements.create('card');
cardElement.mount('#card-element');
// Test card number: 4242424242424242
// Any future expiration, any CVC, any ZIP
const {paymentMethod, error} = await stripe.createPaymentMethod({
type: 'card',
card: cardElement,
billing_details: {
name: 'Test User',
email: 'Test@example.com'
}
});
if (error) {
console.error('Payment method creation failed:', error);
} else {
console.log('Payment method created:', paymentMethod.id);
}
Regional Test Cards #
Stripe provides region-specific Test cards that simulate cards issued in different countries, which is essential for testing local payment methods and regional regulations.
4000000400000008— Card issued in US that requires ZIP code verification4000002500000003— Card requiring authentication (SCA) for European customers4000058260000005— Card issued in Canada4000063640000005— Card issued in Mexico4000007020000003— Card issued in Japan
PayPal Test Credentials #
PayPal’s sandbox environment provides Test accounts and simulated payment flows rather than specific card numbers. Developers create Test buyer and seller accounts through the PayPal Developer Dashboard at https://developer.paypal.com/.
Setting Up PayPal Sandbox Accounts #
- Log in to the PayPal Developer Dashboard
- Navigate to “Sandbox” → “Accounts”
- Create personal (buyer) and business (seller) Test accounts
- Each account receives a Test email Address and password
- Test accounts come pre-loaded with sandbox funds
PayPal Sandbox Credit Card Numbers #
While PayPal primarily uses account-based testing, you can also use Test credit cards within the sandbox for guest checkout scenarios:
| Card Number | Type | CVV | Expiration |
|---|---|---|---|
4032039668731462 | Visa | Any 3 digits | Any future date |
4111111111111111 | Visa | Any 3 digits | Any future date |
5555555555554444 | Mastercard | Any |