Template part has been deleted or is unavailable: header

Test Cards for Multiple Platform

AI Doc Summarizer Doc Summary

3 min read

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 NumberBrandDescription
4242424242424242VisaStandard successful charge
4000056655665556Visa (debit)Successful debit card charge
5555555555554444MastercardStandard successful charge
2223003122003222Mastercard (2-series)Successful charge with New Mastercard range
5200828282828210Mastercard (debit)Successful debit card charge
378282246310005American ExpressStandard successful charge
6011111111111117DiscoverStandard successful charge
3056930009020004Diners ClubStandard successful charge
3566002020360505JCBStandard successful charge

Declined Payment Test Cards #

Card NumberDecline CodeDescription
4000000000000002card_declinedGeneric decline
4000000000009995insufficient_fundsInsufficient funds in account
4000000000009987lost_cardCard reported as lost
4000000000009979stolen_cardCard reported as stolen
4000000000000069expired_cardExpired card
4000000000000127incorrect_cvcCVC verification failed
4000000000000119processing_errorProcessing 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 NumberAuthentication Behavior
4000002500003155Always requires authentication and succeeds
4000002760003184Requires authentication and authentication fails
4000008260003178Requires authentication but card does not support 3D Secure
40000000000032203D 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 verification
  • 4000002500000003 — Card requiring authentication (SCA) for European customers
  • 4000058260000005 — Card issued in Canada
  • 4000063640000005 — Card issued in Mexico
  • 4000007020000003 — 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 #

  1. Log in to the PayPal Developer Dashboard
  2. Navigate to “Sandbox” → “Accounts”
  3. Create personal (buyer) and business (seller) Test accounts
  4. Each account receives a Test email Address and password
  5. 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 NumberTypeCVVExpiration
4032039668731462VisaAny 3 digitsAny future date
4111111111111111VisaAny 3 digitsAny future date
5555555555554444MastercardAny
Template part has been deleted or is unavailable: footer
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.