#pavlos_webhooks

1 messages ¡ Page 1 of 1 (latest)

bronze rainBOT
paper crowBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

bronze rainBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1242900490094776464

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

short thicket
#

The most common reason for this error is you're not actually getting the raw request when checking the webhook signature. Often it's because the middleware modifies/mutates the raw data of the request. You might want to step through your code and make sure you can log the raw request and (once you can) make sure that the variables in your webhook handler are only using the raw request

slender valve
#

I see, so you believe the most likely case is that some middleware we have implemented is altering the request?

#

it works locally, but not on our staging environment, so I will have to ask our platform team

short thicket
#

Hmmmm, does your staging environment use live mode API keys? Or does it use the same test mode API key that you're using locally?

slender valve
#

same test mode key

short thicket
#

Ah, okay. But you're using a different webhook secret via endpoint_secret right? Each webhook endpoint has a different signing secret that it uses to do signature verification

slender valve
#

and I can confirm the event is associated with the test webhook

#

correct

#

it is the signing secret in test mode I am using

short thicket
#

So if you go to the Stripe Dashboard and reveal the signing secret for the webhook endpoint you set up for your staging environment, you can confirm that the secret there is the same as the one you're using in your code?

slender valve
#

correct

short thicket
#

Okay, so in that case, the most likely culprit is that the middleware is mutating the request in some way and you're not actually using the raw HTTP request in your code

slender valve
#

ok thank you, I will ask our platform team to look into both scenerios

short thicket
#

Sure thing! Let us know if they need any assistance