1
0 Comments

High level help with this Stripe Connect setup!?

I’m starting to get confused and concerned I’m using Stripe Connect incorrectly for my use-case, so I’m hoping to get some high-level advice (i.e. not digging into code) if I’m doing this right. Any help would be MUCH appreciated!

I’m trying to build a site like ko-fi.com or buymeacoffee.com, where users can donate money to each other either one-off or monthly recurring. Each donation or subscription can be any numeric amount, created ad-hoc. And all my users will be signed in, no anonymous donation. Ill be using Stripe Connect Standard Accounts and using oAuth to connect the connected accounts. I’ll be using Elements, not the holster checkout pages, for payments.

When a user wants to start a donation page, they use the Connect oAuth flow and I save their connected accountId in my database.

When a donator wants to send a one-off donation I’ll first check if the donator has a Stripe customer ID on the connected accounts Stripe account (i.e. is a customer of the connected account not of my platform account), if not create one. The create a payment intent on the connected accounts Stripe account (again not a payment intent on my platform, instead on behalf of the connected account). Then complete that payment intent via the Elements functions.

When a donator wants to send a monthly donation, I’ll first follow the same check or create customerId flow. Then I’ll have to create a new “product” on the connected account (again not on the platform account). The subscribe the customer to that product at whatever price they chose. I’ll then need to save that subscription in my database so the customer can retrieve it and cancel if needed.

So to summarize, EVERYTHING done so far I’d be doing on behalf of the connected account. Nothing on my platform account other than connecting via oAuth. Using this method end users can have multiple customerIds, one for each connected account they donate to.

Finally, to get a bit more complicated, I’ll need to listen to webhook events coming from the connected accounts in case they manually disconnect, or delete a customer, or delete a subscription, etc. so that I can update my database if needed. Like it the connected account goes to their dashboard and deletes a customer which cancels their subscriptions I’ll need to update the DB to reflect the customer no longer has a customerId as well as is no longer subscribed to show on their dashboard.

Does this all sound right? It’s staring to sound very complex and introduce a lot of places where things could get out of sync. Any simpler ways to do this?

Trending on Indie Hackers
Here's how we got our first 200 users 30 comments Reaching $100k MRR Organically in 12 months 29 comments What you can learn from Marc Lou 20 comments Software Developers Can Build Beautiful Software 13 comments Worst Hire - my lessons 11 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 10 comments