Test Stripe payments locally
mainTo test the payment flow without a real credit card, use the Stripe test card details. You must also have the Stripe CLI installed and logged in (stripe login) to forward webhooks to your local development server.
Test Card Details:
- Card Number:
4242 4242 4242 4242 - Expiration: Any future date
- CVC: Any 3-digit number
Forwarding Webhooks: Run the following command to listen for Stripe events and forward them to your local API route:
stripe listen --forward-to localhost:3000/api/stripe/webhook