#valet01
1 messages · Page 1 of 1 (latest)
Hi
In general, the main reasons behind getting “No signatures found matching the expected signature for payload” error are:
Using a wrong webhook secret. I invite you to double check that you are using the correct webhook secret[1].The request rawbody is being changed[2]. Make sure that nothing is changing the request body of the webhook event body (e.g. compressor, json middlewares) in your integration.
[1] https://stripe.com/docs/webhooks#roll-endpoint-secrets
[2] https://stripe.com/docs/webhooks/signatures#:~:text=Stripe requires the raw body of the request to perform signature verification. If you’re using a framework%2C make sure it doesn’t manipulate the raw body. Any manipulation to the raw body of the request causes the verification to fail.
how can i make sure that nothing is changing the request body ? i logged the req.body and it's of json type so i used the buffer and thank you i really appreciate your help it's been days now trying to resolve this
You need to double check your integration and make sure there is no change it, you need to make sure that's it's a raw format
For example, there must be no JSON parser
Depending on your programming language, I invite you to check this guide:
https://stripe.com/docs/webhooks/quickstart?lang=python
yes that's the guide that i used to implement the stripe webhook function(am using node.js). i will double check everything and if it's okay i will resend a message here to tell you more about what am dealing with thank you
yesss that's what i was looking for thank you so much because i was changing the app.use() and it was messing up the other functions i really appreciate your help thank you