#Pain-webhook-code

1 messages · Page 1 of 1 (latest)

old inlet
#

Thanks for flagging! I can surface this to the right people to get it fixed

violet nebula
#

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.

old inlet
#

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?

violet nebula
#

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.

runic pumice
#

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