#luca-didomenico_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ 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/1292767474399449160
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! well I'd start by adding extensive logs to log the payload variable, the signature header and the key, and checking all of those
Hi! I already logged the WebHook Signing Secret and my Stripe Key, and confirmed they are correct by checking my dashboard
and the payload?
I see on your account you have the same URL registered twice, in test and live mode. That would break this(because we will send you live and test events but your code can't know which it's recieving so it can't know which secret to use).
for test mode events like that one you're mentioning, the secret you use should be whsec_U.....T1HO as on https://dashboard.stripe.com/test/webhooks/we_1Q6utpDCsULkdqK1YeUxdnzk , and not the secret on https://dashboard.stripe.com/webhooks/we_1Q6Dv7DCsULkdqK1CZJK4ssT which is a different endpoint object but same URL
I've removed the live mode URL
and resent the webhook from the dashboard
but still get the same error :/
sure but what signing secret is the actively-running code using
the one in test mode
let me double check because I noticed something weird
give me a sec
the webhook secret was the error
I was changing it on my CDK stack definition
but I discovered that even if you change the value of an env variable but not its name, when you deploy the cdk stack the variable value is not updated
so now I created STRIPE_TEST_WEBHOOK_SECRET and STRIPE_LIVE_WEBHOOK_SECRET
thanks a lot!!
great!