#mr-stackoverflow_webhooks

1 messages ¡ Page 1 of 1 (latest)

delicate needleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260212334706823191

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

blazing plank
#

hi there!

#

Getting a SignatureVerificationError is quite common. It usually comes from two potential errors:

  • You are using the wrong webhook secret. So please double check you are using the correct one. It should look like whsec_xxx and match the one displayed in your dashboard (it's not the same found in the CLI)
  • The payload you pass in the constructEvent function is not the raw payload. So you need to ensure that you get the raw body of the HTTP request that Stripe sent you, without any interference by your code or framework in the middle.
#

To debug this you'll need to add logging to every value you pass to constructEvent (the payload, the secret, and the signature header)

paper sparrow
#

Please reread ur second point slowly

#

Raw or not raw?

blazing plank
#

I think my sentence is pretty clear: the error may comes from not passing the raw payload. so you have to pass the raw payload.

#

but first, did you triple check that you are using the correct webhook endpoint secret?

delicate needleBOT
paper sparrow
#

Thank you

#

Secret key was wrong, it was the one I was using for local. I went to dashboard -> developer -> webhook -> the one being used -> secret