© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
3 replies
Nollix

Stripe calls edge-function safely?

edge functions
I’m using Supabase and Stripe, and I’d like to understand if the way I’ve implemented my payment flow is secure, or if there is a better pattern.

I’ve created a Supabase Edge Function that is called by Stripe via a webhook. When Stripe calls the Edge Function, the function:

1)Verifies that the request really comes from Stripe.

2)If the verification passes, it uses the "supabase service role key" to update the database and bypass RLS, so that the reservation status is always updated after the payment is confirmed.

In more detail:

Stripe is verified through authenticated API calls using the stripe secret key (and/or the webhook secret).

The database updates use the "supabase service role key" so the function can bypass Row Level Security and modify the reservation record, even if the user is not logged in.

Is this approach secure?
Are there recommended best practices or alternative ways to implement this flow with Supabase + Stripe? I would like something that doesn't bypass the RLS
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Edge function error for stripe connect
SupabaseSSupabase / help-and-questions
6mo ago
[SOLVED] Cannot import Stripe on Supabase Edge function
SupabaseSSupabase / help-and-questions
4y ago
Edge Function
SupabaseSSupabase / help-and-questions
5mo ago
auth edge function
SupabaseSSupabase / help-and-questions
2w ago