💳 STRIPE TEST CARDS — CLICK TO COPY! TEST CARDS
Visa
4242 4242 4242 4242
Any future date • Any CVC
SUCCESS
Mastercard
5555 5555 5555 4444
Any future date • Any CVC
SUCCESS
Amex
3782 822463 10005
Any future date • Any CVC
SUCCESS
Visa 3D Secure
4000 0025 0000 3155
Requires authentication
3D SECURE
Visa
4000 0000 0000 0002
Generic decline
DECLINE
Visa
4000 0000 0000 9995
Insufficient funds
DECLINE
📋 MORE TEST SCENARIOS EDGE CASES
💥 Processing Errors
4000 0000 0000 0119Processing error
4000 0000 0000 0069Expired card
4000 0000 0000 0127Incorrect CVC
⚡ Special Cases
4000 0000 0000 0341Attaching SCA
4000 0000 0000 3220Non-3D Secure
4000 0000 0000 3063Always requires payment
💻 INTEGRATION GUIDE CODE

🖥 Frontend (JavaScript)

// Initialize Stripe
const stripe = Stripe('pk_test_your_key');

// Create payment element
const elements = stripe.elements();
const cardElement = elements.create('card');
cardElement.mount('#card-element');

// Handle form submission
form.addEventListener('submit', async (event) => {
  event.preventDefault();
  const {error, paymentMethod} = await stripe.createPaymentMethod({
    type: 'card',
    card: cardElement,
  });
  if (error) {
    console.error(error);
  } else {
    console.log(paymentMethod);
  }
});

🖧 Backend (Node.js)

// Node.js example
const stripe = require('stripe')('sk_test_your_key');

app.post('/create-payment-intent', async (req, res) => {
  const {amount, currency = 'usd'} = req.body;
  try {
    const paymentIntent = await stripe.paymentIntents.create({
      amount: amount * 100, // cents
      currency,
      automatic_payment_methods: {
        enabled: true,
      },
    });
    res.json({
      clientSecret: paymentIntent.client_secret
    });
  } catch (error) {
    res.status(400).json({error: error.message});
  }
});