Closed TommyDong1998 closed 5 months ago
Update: Found out that the env variable STRIPE_WEBHOOK_SECRET_LIVE is now STRIPE_WEBHOOK_SECRET 😅
The error came from
if (!sig || !webhookSecret) return;
Lets change that to
if (!sig || !webhookSecret) {
return new Response(`Missing signature or webhook secret`, {
status: 500
});
}
so that it is more understandable
@TommyDong1998 Were you able to get this resolved? I validated the .env variable and I still receive a 500 error. I believe it is more of an issue with the stripe signature
@espinozahector Renaming the environment variable STRIPE_WEBHOOK_SECRET_LIVE
to STRIPE_WEBHOOK_SECRET
in the Vercel settings of your project fixes the error. Don't forget to redeploy the latest deployment from the Vercel Dashboard for these changes to take effect.
Previously the webhooks were working but I noticed this week that the webhooks are all giving 500 errors. I deleted an product from stripe console and also added one. They all give the same error:
[POST] /api/webhooks
No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set persistSession to true, please provide a storage option or you may set persistSession to false to disable this warning.