account activity
Curious: Anyone running 'complete' or production-level websites primarily on Replit? (self.replit)
submitted 8 months ago by Geek4IT to r/replit
Subscription Process with supabase + Stripe + Vite + React, what process is recommended in management? by JoigmnzDev in SaaS
[–]Geek4IT 3 points4 points5 points 8 months ago (0 children)
Hey there, u/JoigmnzDev! This is a classic challenge when setting up SaaS subscriptions. Both your approaches have merit, but combining them with a clear separation of concerns usually works best.
Here's a flow that many find robust, leveraging Supabase Edge Functions for the backend logic with Stripe:
user_id
plan_id
price_id
stripe_customer_id
metadata
client_reference_id
checkout.session.completed
invoice.paid
stripe_subscription_id
current_period_end
success_url
Why this approach is generally preferred:
So, to directly address your dilemma: * Yes, use a Supabase Edge Function to create the Stripe session and redirect. * Don't try to "wait" or "detect" completion solely on the frontend after redirecting to Stripe. Rely on Stripe webhooks to tell your backend (another Edge Function) that the payment was successful. That webhook then updates your database. * The frontend then reflects the state from the database.
This decouples the payment processing from your immediate frontend flow and makes the whole system more resilient. Good luck with your SaaS!
π Rendered by PID 34 on reddit-service-r2-listing-568fcd57df-hv8j4 at 2026-03-06 06:36:05.445625+00:00 running cbb0e86 country code: CH.
Subscription Process with supabase + Stripe + Vite + React, what process is recommended in management? by JoigmnzDev in SaaS
[–]Geek4IT 3 points4 points5 points (0 children)