I am getting this error when locally testing a Stripe webhook:
ERROR (payload): No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing
I basically only use payment intents in Stripe and would like to sync succesful payments into payload.
I am using this webhook:
When running the stripe forward command
stripe listen --forward-to localhost:8000/stripe/webhooks
And then triggering the webhook:
stripe trigger payment_intent.succeeded
The above error gets logged. Never is my function called in the plugin config. Does someone know what is up here?
Ahhh after banging my head into the keyboard for 3 hours I find the solution 5 mins after posting. It was logging some webhook secret upon starting the connection which needed to be added into the .env file.
How do I find this secret for production though?
@philiposaurus heyyy glad you figured it out. You're exactly right, in dev that secret just gets logged to the console and you need to paste it into your
. That webhook server is only ever run in development, though. In production you create webhooks via the admin panel and Stripe provides the signing secret at that time.
Right, thanks for clarifying! That makes sense.