Fix: Lovable App Only Processes Test Payments, Not Real Ones
Quick Answer
You're using test API keys (sk_test_... and pk_test_...). Replace them with live keys (sk_live_... and pk_live_...) from Stripe Dashboard > Developers > API keys (toggle to 'Live' mode).
Quick Fix Summary
| Issue | Lovable + Stripe stuck in test mode |
| Fastest fix | Get your live API keys |
| Use this page if | Payments only work with test card numbers |
Symptoms
- !Payments only work with test card numbers
- !Real credit cards are declined
- !Stripe dashboard shows test mode badge
- !Checkout works but no real money is collected
Step-by-Step Fix
Get your live API keys
Go to Stripe Dashboard > Developers > API keys. Toggle from 'Test' to 'Live' at the top. Copy the new pk_live_ and sk_live_ keys.
Update environment variables
In your deployment platform, replace: STRIPE_SECRET_KEY=sk_test_... with STRIPE_SECRET_KEY=sk_live_... and NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_... with pk_live_...
Update webhook endpoint
Test and live webhooks are separate. Go to Stripe Dashboard (Live mode) > Webhooks > Add endpoint. Enter your production webhook URL. Copy the new whsec_ signing secret.
Create live products and prices
Products created in test mode don't exist in live mode. Create your products and prices again in Live mode, or use the Stripe API to copy them. Update your price IDs in your code.
Frequently Asked Questions
Yes. Test mode and live mode have separate products, prices, and customers. You need to recreate everything in live mode before accepting real payments.
Not directly. But you can create a $1 test product, process a real payment, then immediately refund it from the Stripe dashboard.
Related
Weekly Signals
Get the next fix, switch, or warning before it hits your build.
Join builders getting the community signals, fix patterns, and tool shifts that matter before they show up everywhere else.
Follow the signals →