We've moved discussions to Discord

Multitenancy with multiple Stripe accounts

Joe Tebaldi
Chris Oliver I'm building a free app to allow gym owners to deliver workouts to their members behind a subscription plan (I'm trying to help since so many had to close doors due to COVID 19). I'm self-taught so I'm still learning a lot but I wanted to make it multitenant so each gym owner could have their own "studio" and users could create an account to subscribe to one or more gyms. I've been working on it nonstop for the past week, and I'm about to start from scratch because I've learned so much that I'd want to do differently. I have a question I would love if you could offer any advice on...

1. Can each gym/studio have it's own stripe to charge their members? I know how to setup the one in jumpstart config but isn't that global for the app or can it be manipulated/scoped so each account can have its own Stripe config?
Chris Oliver
Right now, the Pay gem doesn't have any features for marketplace type payments, but you can certainly build it. We're just a wrapper on top of the Stripe gem, so you can add any code you need for marketplace type payments in yourself using the Stripe gem directly.

I would create a separate GymPlan model for the pricing models that Gyms will charge their customers, and you can use Stripe Connect to let a gym register their Stripe account with your app. Then when you create subscriptions or charges, you'll use Stripe Connect to make them. It's usually just an additional parameter passed into the Stripe::Subscription.create method to say I want to charge this customer on behalf of this other Stripe account that the gym owns.

Stripe has lots of docs on how to do that: https://stripe.com/docs/connect/subscriptions
Joe Tebaldi
Got it! That makes sense... thank you!
Notifications
You’re not receiving notifications from this thread.