#godspeed-node-signatures

1 messages · Page 1 of 1 (latest)

remote dirge
#

hello, this is a common problem with node because most node web frameworks modify the incoming webhook request's body, where-as the constructEvent function needs the raw body from the request

you might have to try suggestions like this one: https://github.com/stripe/stripe-node/issues/1254#issuecomment-957788296
which exempt your webhook endpoint from any middleware modifications to the request body

GitHub

Another 'Webhook validate signing' issue! Whoooohooo 🥳 Hi there! I am trying to built a Backend Server for a Web project with Google Cloud App Engine. What do I want to achieve: I w...

broken anvil
#

Alright, I'll try to see if I can get it to work with thiis

broken anvil
#

I found a solution for SvelteKit Stripe integration. SvelteKit does modify the request body, so had to find a way to get the original raw body.

Solution:
const StripePayload = Buffer.from(request.rawBody);
and then use this in the stripe.webhooks.constructEvent method instead of solely using request.rawBody

clever anvil
#

Awesome! Is there anything else I can help you with?