#riptired_api

1 messages ¡ Page 1 of 1 (latest)

scarlet scaffoldBOT
white fjordBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

scarlet scaffoldBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1257399002228588626

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

wise flare
#

Can you elaborate? What's your specific question?

mental marsh
#

Hi, I have setup a test mode flow where I have successfully made transfers (by bypassing pending balance with payment methods), and emulated vaguely how the stripe connect setup would work. Now I want to specifically emulate the exact setup I will need to move this into production with stripe connect.

My configuration for connected accounts will be express accounts. The general flow is as follows. I as the platform collect payment on subscription products for all of my clients. For each client, I will split out 50% of the payment to their connected account and retain the rest as my platform portion of the revenue share. There is only 1 product per client (a set price subscription/month product). I will pay out all of my clients at the end of each month with their portion of the subscriptions charged over that month.

Here is my first question:

  1. What is the best practice for creating Transfers from my platform to the connected account the Payout should go to? For each subscription I assume when the subscription is created I should create the Transfer object with the source transaction as the charge for that subscription and the destination as the connected account that subscription product should split the revenue with? How does this interface with paying out the connected account only at the end of the month?
wise flare
#

You would need to use Separate Charges and Transfers (SC&T) for this flow: https://docs.stripe.com/connect/separate-charges-and-transfers. This will allow you to hold onto funds in your platform balance until ready to pay out at the end of each month.

The Transfer creation would need to be scheduled on your end (likely via. CRON job or similar), since Stripe doesn't have the ability to schedule Transfers for future dates.

Create charges on your platform account and transfer funds to multiple connected accounts.

mental marsh
#

Okay so I have another case where I need to pay out to 2 connected accounts, the only difference would just be I initiate 2 Transfers for each subscription using SC&T right

#

And then in this case is there any point in making payment links with payment splits? I assume no correct?

#

So if I am understanding this correctly then my entire flow E2E is basically as follows:

  1. Create products on my platform for each of my connected accounts, create payment links for those products (with no autopay or payment split configured)
  2. listen to webhook events for the subscriptions
  3. at the end of the month when I want to payout the clients, I need to go through each charge succeeded event that happened that month and use that as the source for the each transfer for that month (i.e. any charge.succeeded event that happened during the month I want to payout for). If each of my clients has 100 subscriptions that were charged that month, I would go through each and create a transfer with the split percentage.
  4. create a single payout on each connected account to their linked bank / debit card
wise flare
mental marsh
#

Why not

scarlet scaffoldBOT
mental marsh
#

I've been told by other Stripe support people that this is feasible, I have a couple of threads related to this same issue in discord as well

jovial swallow
#

Hello two-shoes has to step away soon but I can help out. Catching up on this thread

mental marsh
#

Got it

jovial swallow
#

We talked it over a bit more. You can use SC&T with payment links, two-shoes was mostly thinking that as integrations get more complex, the extra customizability of Checkout typically makes things easier. Either way the overall shape of what you listed is good. It may be good to try implementhing this through PaymentLinks and Checkout in test mode to see if one works better for you.
One thing I am thinking when reading through your steps is that for step #3 instead of scheduling a monthly job may be easier for you to listen to invoice.paid events, split payments as they come in, and then schedule payouts to happen monthly

mental marsh
#

Ah I see, regarding Stripe Checkout, I don't have a website for this platform so we are just running off of payment links since those can be used en masse for all of our clients customers

#

i.e. we aren't using the API to create checkout sessions since there are only 5 products for 5 clients (and so on)

#

Regarding the monthly job, by splitting payments do you mean creating transfers to the connected accounts from the platform? And then for the scheduling payouts, how am I configuring that

jovial swallow
mental marsh
#

So for automatic payouts I would just use the API to update the connected account with what interval I want to pay them out at?

jovial swallow
#

Correct

mental marsh
#

okay and then invoice paid events would have the corresponding Charge ID I would need to use as the source transaction for each Transfer correct?

jovial swallow
#

They would have the PaymentIntent's ID but not the Charge's, so you would need to retrieve the PaymentIntent to get that charge ID I believe.

mental marsh
#

Okay cool. Thanks for clearing this up, this implementation is a lot simpler than I thought.

So I currently have a stripe account that has a product with active subscribers. I can turn stripe connect on for that account and after that client connects their account to mine, all I would need to do is on invoice.paid create a Transfer to their connected account and update their connected account for monthly payouts.

Going forward after stripe connect is enabled on my account, for each client I onboard, I would have them link their account and do the following:

  1. create a product and payment link for them
  2. update their connected account for automatic payout
  3. listen to invoice paid events and create transfers with whatever revenue share split I need (transfer to 1 account or X accounts per invoice paid)
  4. payouts are automatically setup and happen without any further input from me
jovial swallow
#

Yep, that sounds like a great plan to me

mental marsh
#

I guess one outstanding question, enabling stripe connect on that account with live subscribers doesn't change anything for ongoing subscriptions correct?

#

so I can start this migration after some more testing without interfering with ongoing products

#

Ah and then for connected accounts and products that only have 1 connected account that I need to payout, I cannot use the dashboard payment split if i want to pay out monthly correct? or what are the main considerations if the dashboard payment split is used as well

jovial swallow
#

I am less familiar with the dashboard payment split, looking in to that now

#

When you say that, are you talking about creating transfers via the dashboard? Or something else?

mental marsh
#

No, so my product team creates products for the connected accounts and configures that in the past. In the dashboard when you make a payment link you can also set the payment split with a connected account, so I was wondering if that can still be used with this general flow or if that messes up or is incompatible with the flow we just outlined

jovial swallow
#

Ah, that should be compatible, though I think with those you would only be able to define one account to split with per payment link

mental marsh
#

Okay so then the only diff would be if payment links are configured with a payment split, I would skip listening to invoice paid events for those links since the Transfers would already be handled but those connected accounts still need to be updated to have automatic payouts

jovial swallow
#

Yep, that sounds feasible to me

mental marsh
#

Perfect, thanks for clearing this up