How Test Mode Works
Test mode is determined per-plan, not per-environment. A plan withtest_mode: true routes checkout through test credentials. This means you can have test and live plans running in the same Crovver instance simultaneously.
Setup
1. Connect test payment credentials In the dashboard, go to Settings → Payment Providers and add a provider with test credentials (e.g., Stripe test secret keysk_test_...). Give it a name like stripe-test.
2. Create a test plan
Create a plan with test_mode: true. Crovver will automatically use the provider configured for test mode.
3. Use test API keys
Generate a pk_test_... public key and sk_test_... secret key from Settings → API Keys.
Stripe Test Cards
| Card Number | Scenario |
|---|---|
4242 4242 4242 4242 | Successful payment |
4000 0000 0000 0002 | Card declined |
4000 0025 0000 3155 | Requires 3D Secure |
4000 0000 0000 9995 | Insufficient funds |
Local Development Checklist
- Crovver API running on
localhost:3000 - Stripe CLI running:
stripe listen --forward-to localhost:3000/api/webhooks/stripe - Test plan created with
test_mode: true -
pk_test_...key set in your frontend env -
sk_test_...key set in your backend env
The Stripe CLI prints a webhook secret. Set it as
STRIPE_WEBHOOK_SECRET in your Crovver .env for local webhook processing.