#Pain-webhook-code
1 messages · Page 1 of 1 (latest)
This is using Node, would you also be able to address the express issue?
Most people use express.json() as middleware of which will cause issues with the payload.
There is already an answer on this but would be great if it was clarified somewhere on the documentations https://github.com/stripe/stripe-node#testing-webhook-signing
Can you clarify what your exact ask here is? Are you just asking that the webhook signing issues should be surfaced in the stripe-node documentation?
That's correct
This error will persist whilst using express.json()
⚠️ Webhook signature verification failed. 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
Whilst it's clarified in the error, I believe a note should be made in the documentation to avoid this.
Thanks for the feedback - we do try to make this clear in the webhook docs when emphasizing use of the raw body and our examples using eg express.raw() here and a copy of the raw body in other cases
eg, extra middle ware to capture request.rawBody = request.body before json deserialization happens