Payment Tester
Test Stripe payments with test cards. Safe environment for development and testing.
Stripe Test Cards
Visa
Success
4242 4242 4242 4242
Any future date, any CVC
Visa
Decline
4000 0000 0000 0002
Generic decline
Mastercard
Success
5555 5555 5555 4444
Any future date, any CVC
Amex
Success
3782 822463 10005
Any future date, any CVC
Visa
3D Secure
4000 0025 0000 3155
Requires authentication
Visa
Decline
4000 0000 0000 9995
Insufficient funds
More Test Scenarios
Processing Errors
4000 0000 0000 0119 - Processing error
4000 0000 0000 0069 - Expired card
4000 0000 0000 0127 - Incorrect CVC
Special Cases
4000 0000 0000 0341 - Attaching SCA
4000 0000 0000 3220 - Non-3D Secure
4000 0000 0000 3063 - Always requires payment
Integration Guide
Frontend Integration
// 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 {
// Send paymentMethod.id to your server
console.log(paymentMethod);
}
});
Backend Integration
// 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, // Convert to cents
currency,
automatic_payment_methods: {
enabled: true,
},
});
res.json({
clientSecret: paymentIntent.client_secret
});
} catch (error) {
res.status(400).json({error: error.message});
}
});