#louisdaubie
1 messages · Page 1 of 1 (latest)
Hello! That error usually means you're either not using the correct Webhook Endpoint Secret or not passing in the raw body of an incoming webhook HTTP request to the function that tries to create the Event from the incoming payload.
Hello, yes i know but we got this error on production
we use it since 2 years already and never get this error
We try to log what's happen
but nothing seems false
when send the body as buffer, the good private_key and the stripe signature header
So things were working fine, then you got this error suddenly with no changes on your end? Is it happening all the time now, or did it just happen once?
Is it happening all the time now..
the only thing that change is we use 2 different endpoints during the migration
It sounds like maybe your webhook secret got rolled or changed. Can you verify that by looking at the Webhook Endpoint in your Dashboard and comparing the secret there with the one your code is using?
but few days ago it was working on production
I already check it
that was we i mean first, change change in the environnement secret but everything look good to me
and the backend side
Do you know if the front end can influence on it ?
I can't say, it depends on how you built your integration. Usually the frontend isn't involved with Stripe webhooks at all.
Well, as I mentioned above, either the secret is wrong or the raw body isn't being provided. It must be one of those two things.
Well, the other possibility is that someone other than Stripe is sending requests to your Webhook Endpoint.
That entity wouldn't have your webhook secret, which means the signature validaiton process would fail as expected.
Can you check your logs and confirm the requests in question are coming from the IPs listed here? https://stripe.com/docs/ips#webhook-notifications
Yes but i doing test with my own credit card, i am pretty sure the webhooks come from stripe lol
I log the signature, the body and the secret temporaly for be sure we send the good thing to the functino
We got evrything good..
I mean, everything isn't good if you're getting that error.
You know that because you're getting the error? I don't understand what you mean.
Let's back up.
You're getting an error that webhook signature verification failed.
I explained all the possible causes of that error.
I don't have access to your systems or integration, so the next step is for you to figure out which of those possibilities is causing the error.
I'm happy to answer any other quesitons you have about Stripe, but I'm not sure what else I can do to help you with this specific error.
You don't have some indication that can help to determine witch one is the error ?
Because i understand the only possibility is one of the value is not good
But the secret is good 100% sure
So it's could be the body or the header signature
But we got them 100% sure and it's provide by stripe ..
There's no way for me to narrow it down further for you, no. That error has several possible causes.
I really thing that if your code hasn't changed the most likely thing is the secret is wrong.
If your code has changed the most likely thing is the raw body isn't getting to the Event constructor function.
Ok thanks for you're answer