production stripe webhook secret

Should the stripe webhook secret (STRIPE_WEBHOOK_SECRET) change for production? Test stripe webhook worked but when testing outside of testmode in production app doesnt seem to be able to detect webhook once payment goes through
7 Replies
kapa.ai
kapa.ai2w ago
Hi @I’m not kidding.. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, you need to use a different webhook secret for production. Based on the knowledge sources, when moving from development to production, you need to change the webhook secret in your environment variables. According to a recent Discord thread, when deploying to production (like Fly.io), you need to: 1. Create a new webhook in the Stripe Dashboard (Developers > Webhooks section) 2. Point this webhook to your production server URL (e.g., {your-fly-server-domain}/stripe-webhook) 3. Get the new webhook secret from the Stripe dashboard 4. Add this new webhook secret to your production environment variables As one user explained:
"The Stripe CLI that the Open-Saas Docs reference has to do with local Dev, once you deploy to Fly.io for example, you have to change the webhook secret in the Stripe -> Dev -> Webhooks section, create a new webhook by URL pointing to your server url/stripe-webhook endpoint, and then add the Webhook Secret found on the stripe dashboard to your .env settings." Discord Support Thread
This is now documented in the Open SaaS guides for deploying: Setting up your Stripe webhook If you're getting errors like "No signatures found matching the expected signature for payload", it's likely because you're still using the development webhook secret in production. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @I’m not kidding., I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho2w ago
@Vinny (@Wasp) one for you
Vinny (@Wasp)
Vinny (@Wasp)2w ago
Hey @I’m not kidding. did you read through the Production Stripe Webhook guide? https://docs.opensaas.sh/guides/deploying/#setting-up-your-production-stripe-webhook
OpenSaaS.sh
Deploying
Open SaaS is a free, open-source, full-stack SaaS starter kit for React + NodeJS.
Vinny (@Wasp)
Vinny (@Wasp)2w ago
You'll create a production webhook and it will give you a new signing secret
Vinny (@Wasp)
Vinny (@Wasp)2w ago
No description
Vinny (@Wasp)
Vinny (@Wasp)2w ago
docs have all the info
I’m not kidding.
🤦‍♂️ Oops Thank you!

Did you find this page helpful?