#50 most commonpaymentsLovableBolt.newCursorReplitv0Windsurf
Stripe: Invalid API Key provided / You did not provide an API key
StripeAuthenticationError: Invalid API Key provided: sk_test_**** / You did not provide an API key.
Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.
Paste your error →What it means
Your payment code is using a missing or wrong Stripe key. The secret key must only live on the server, and the publishable key goes in the browser.
How to fix it: paste this prompt into your AI builder
Fix prompt for Lovable, Bolt, Cursor, Replit, v0, Windsurf
Stripe says "Invalid API Key" / no API key. Make sure STRIPE_SECRET_KEY (sk_...) is only read in server code/edge functions from a server-only env var, and the publishable key (pk_...) is used in the browser. Check the env var names match and that they're set on my host. If a secret key ever appeared in frontend code, tell me so I can roll it. Don't change unrelated code.
If the AI can't fix it: manual steps
- Stripe Dashboard, Developers, API keys. If you use Supabase Edge Functions, set secrets there, not only in .env.
Where this happens
Seen in these AI app builders and editors:
LovableBolt.newCursorReplitv0Windsurf
Sources
Related payments errors
Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.
Fix my error →