#Swampi995
1 messages · Page 1 of 1 (latest)
i generate test header using your method const header = stripeAccount.webhooks.generateTestHeaderString({ payload: request.rawBody, secret: endpointSecret });
Hi,
it worked just fine before, and didn't change anything
There must be something changed.
Try running on of the samples here and see if you can reproduce:
https://github.com/stripe/stripe-node/tree/master/examples/webhook-signing
I am getting this
I am getting this
our account was blocked for a while, can it be something related to that?
can you share you account id ?
acct_1JwlGhBXaJQ2WEks
Your accounts looks ok for now.
There must be something changed in your integration that makes the webhook signature verification failed, webhook secret changed, the body request is changed by setting a new middelware for example...
you have app.use(compression())which is global
Try do do something like this:
https://github.com/stripe/stripe-node/blob/master/examples/webhook-signing/express/main.ts#L19
i did this to all my functions
but still getting ❌ Error message: 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
You still have something in your result express instance that is modifying the request body of the webhook request then.
Try to simply run this example:
https://github.com/stripe/stripe-node/blob/master/examples/webhook-signing/express/main.ts
And then check in your integration what is modifying the request in your instance.
but with generateTestHeaderString it works fine, shouldn't it fail since i'm using the exact same body and secret?
clearly it's something with that stripe-signature
it creates the event correctly, everything works fine
generateTestHeaderString don't pass throw your Express middlewares.
but I'm passing to it the same body
this is the request that is not working
and this one is working
the only thing that is different is the header, when it's not working im getting it from the request, when its working im generating it, that it
You are generating a signature for the body you set, so it will work for whater body you set in generateTestHeaderString
Try another completly different body and pass it to generateTestHeaderString and the signature verification will work. Again, the. generateTestHeaderString don't pass throw your express middelware. You have something that is updating the body of the request.