#ovaltechnologies
1 messages · Page 1 of 1 (latest)
Hi, can you summarize what the issue is here?
I do not think that is what it means. This, https://cloud.google.com/functions/docs/writing/write-http-functions#parsing_http_requests is modifying the body which we expect raw body
Ok.
So I keep getting the error Webhook Error: No signatures found matching the expected signature for payload.
{"type":"StripeSignatureVerificationError","raw":{"message":"No signatures found matching the expected signature for payload.
In fact I copied the code provided by stripe when you add a webhook but I still got the same error
I am using cloud functions from Firebase and I do not have any other middlewares installed
and I still got the same error
so that is basically the challenge
Firebase looks to be causing this issue as we require raw body, https://stripe.com/docs/webhooks#verify-official-libraries.
Stripe requires the raw body of the request to perform signature verification. If you’re using a framework, make sure it doesn’t manipulate the raw body. Any manipulation to the raw body of the request causes the verification to fail.
As my teammate suggested, you need to adjust your code so express.raw runs before anything else. You would need to figure this out on your end.