Stripe Webhook Server in production
Hi! How should set up Open-Saas on Fly.io to also have my Webhook Server running? Do I need to run another fly machine that is just for the webhook server?
Or can I run it in my same Server instance?
10 Replies
OR, should I use stripe webhook that points to a URL? And if so I think I need to update the WASP webhook logic.
in Stripe Dashboard you can set webhook endpoint to your server domain
it should look something like {your-fly-server-domain}/stripe-webhook
Great! Can we get some documentation on that on the readme?
they linked it in the stripe testing section https://stripe.com/docs/webhooks#test-webhook
Receive Stripe events in your webhook endpoint
Listen to events in your Stripe account on your webhook endpoint so your integration can automatically trigger reactions.
Using that method I get
No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
I wonder if it's an issue with the Stipe API version conflict?
OR I need to add different webhook key for using the webhook endpoint?
UPDATE
OK figured it out. 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. Hope this helps someone!Nice work @Gwain and @uglybeanhead
I'm sure this will help someone in the future π
Hey @Gwain & @uglybeanhead. Thanks for bringing this issue up π
I've added a guide for setting up the stripe webhook in prod. Mind taking a look and letting me know if I've missed anything?
https://docs.opensaas.sh/guides/deploying/#setting-up-your-stripe-webhook
OpenSaaS.sh
Deploying
Open SaaS is a free, open-source, full-stack SaaS starter kit for React + NodeJS.
So impressed Vinny with your response and docs. Yes that's perfect! You guys are awesome
oh, thanks π just trying to help out our users
and thanks again for making us aware of that issue