#louisdaubie

1 messages · Page 1 of 1 (latest)

twilit troutBOT
fallow anchor
#

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.

ionic raft
#

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

fallow anchor
#

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?

ionic raft
#

Is it happening all the time now..

#

the only thing that change is we use 2 different endpoints during the migration

fallow anchor
#

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?

ionic raft
#

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 ?

fallow anchor
#

I can't say, it depends on how you built your integration. Usually the frontend isn't involved with Stripe webhooks at all.

ionic raft
#

Yes that was what i thinking

#

but i have realy know idea why it's happening

fallow anchor
#

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.

ionic raft
#

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..

fallow anchor
#

I mean, everything isn't good if you're getting that error.

ionic raft
#

yes i sure but how can i know what

#

because when i check everything look good to me

fallow anchor
#

You know that because you're getting the error? I don't understand what you mean.

ionic raft
#

I am not sur to understand ?

#

i know what ?

fallow anchor
#

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.

ionic raft
#

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 ..

fallow anchor
#

There's no way for me to narrow it down further for you, no. That error has several possible causes.

ionic raft
#

ok

#

thanks

fallow anchor
#

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.

ionic raft
#

Ok thanks for you're answer