My Stripe webhook works in local but not production

I have a Nuxt 3 app using Supabase for auth/database and I’m using Stripe to collect payments, Cloudflare Pages free tier for hosting.

I have a subscription with Stripe Checkout. The user must be signed it to subscribe, and when they pay it sends their unique Supabase user id to Stripe which delivers it as a webhook to my app endpoint.

In my endpoint, I process the body and do all the necessary stripe stuff (verify sig etc), but the issue is when I try to grab the user from my profiles table by their unique id to update the row, nothing happens.

The issue isn’t on Stripe’s side because the webhook has no errors. I also test in local and everything works fine, even succesfully updates my profiles table in Supabase. But nothing in production.

I’m using my Supabase service role key so I don’t think it’s an RLS issue. I even tested it on a table with minimal RLS and once again, works in local but not production. I’ve checked my Cloudflare env variables, they are all configured for production.

I was told to check my CF function logs but I don’t really know where to log for something like this. I’m assuming it’s a Cloudflare issue but I really have no clue. I’m having to update customers manually and it’s costing me. Anyone know what it could be?

Hi there,

Solely with that info, it’s hard to know exactly what the issue might be, I would maybe advise you to check your firewall events under Security > Events and see if you have something being blocked there that might be preventing the completion.

Take care.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.