You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The validation throw an exeption with a validation error message:
Error: 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
However if I exclude the parse middleware ( bodyParser.json()) from my api, the validation method is successful. But I can't remove this middleware of my application because it'll change all my project structure.
The text was updated successfully, but these errors were encountered:
@MatheusAlvesSouza there have been multiple issue threads discussing this before which might help, especially this one: #341
Often, it's due to your own tooling parsing the JSON when we actively require that you use the raw JSON from the body without any parsing or encoding on top of it.
Your code right now takes the parsed JSON and stringify it. Which means the JSON you generate is different from the one we sent you, even if just by one space, which means the signatures don't match,
Node version : 8.11.3
Stripe version : 6.7.0
I'm having a problem with the validation request from webhook. My application has a parse middleware to JSON with the lib body-parser :
And when I'll use the function:
The validation throw an exeption with a validation error message:
Error: 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
However if I exclude the parse middleware (
bodyParser.json()
) from my api, the validation method is successful. But I can't remove this middleware of my application because it'll change all my project structure.The text was updated successfully, but these errors were encountered: