#sheep_lord
1 messages · Page 1 of 1 (latest)
To align on terminology, is your "hub" account the main platform account that all of the connected accounts are connected to?
I am actually unsure if transferring funds from one connected account to another is a supported use case but am looking in to it. Can you share the error code that you are getting?
You need to create sessions to do this.
Checkout these docs
https://stripe.com/docs/api/checkout/sessionsconst lineItems: Stripe.Checkout.SessionCreateParams.LineItem[] =
sessionsToPurchase.map(({ title, description }) => ({
price_data: {
currency: 'USD',
product_data: {
name: title,
description: description,
},
unit_amount: 40 * 100,
tax_behavior: 'inclusive',
},
quantity: 1,
}))const stripeSession = await stripe.checkout.sessions.create({
line_items: lineItems,
success_url: ${returnUrlQuery}purchased={CHECKOUT_SESSION_ID},
cancel_url: ${returnUrlQuery}payment-problem=cancelled,
mode: 'payment',
allow_promotion_codes: true,
payment_intent_data: {
application_fee_amount: platformCut,
transfer_data: {
destination: coach.stripeId,
},
on_behalf_of: coach.stripeId,
},
metadata: {
programId: payload.program_id,
userId: userId,
sessionCount: sessionCount.toString(),
},
})Hope this helps
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Nope. The hub account is one of the connected account.
Are you sure transfer of funds from one connected account to another is not supported ? If it is then what flow I should use to achieve this ?
const transfer = await stripe.transfers.create({
amount: 40,
currency: 'usd',
destination: COACH_ACCOUNT_ID,
})
This code works find but it is transfering from my stripe main account to coach account.
What I tried is:
const transfer = await stripe.transfers.create({
amount: 40,
currency: 'usd',
source_transaction: CORPORATE_ACCOUNT_ID,
destination: COACH_ACCOUNT_ID,
})
But I got an error that "No such charge: account_id"
Ah, transferring from a connected account to another connected account is defintely not supported unfortunately. The way that I think this may be possible would be that you would take funds from the hub account to your platform account and then transfer the funds back down to the other connected account
I want to have separate history for all of this transactions for hub account. Is there some other model I can look for apart from using the main account for transfering funds to other connected accounts ?
To clarify, are you saying that you want the hub account to see all of the transactions for the associated coach accounts?
That would take custom coding on your side, Stripe doesn't have a concept of one connected account being responsible for transactions of another connected account. So I think you'd need to list the transactions for each other connected account and display them together
No the actual thing is that we have coaches account as connect accounts in our platforms.
And our main account only collects the platform fees which is 10% of the transaction fees. Currently all the connected accounts act as destination account. And clients pay through a payment link of stripe.
Now I want to add a funding account of corporate managed by us. And on behalf of some clients we want to make some payments from this account to coach's account and our main stripe account should keep collecting only platform fee of only 10% of transaction.
This is the case I want to tackle.
For this I previously though can be achieved by creating a new connected account manually. But seems like it is not working or achievable by transfer feature of stripe.
For summary I want
-> Main stripe account to only collect the platform fee (10% of transaction)
-> A separate funding account to hold the balance on behalf of some clients
👋
Now I want to add a funding account of corporate managed by us. And on behalf of some clients we want to make some payments from this account to coach's account and our main stripe account should keep collecting only platform fee of only 10% of transaction.
In order for you to transfer funds from one stripe account to another, they need to be connected in platform <-> connected account relationship. So what you're asking for is setting up another platform account that acts as the "hub" account
I don't believe connect can currently support a usecase like that unforutnately.
So I have to create a new stripe account on behalf of that "hub" account.
And do payments to coaches account from that one this way I would be able to transfer only platform fee to the main stripe account. RIght ?
But this would require a separate Stripe API key to initiate Stripe object in backend & I have to duplicate the connected account in the new Stripe account in order to make transfers using API.
Correct, that lands you in situations where
1/ you have multiple connect account for one coach
2/ your platform account (main account) is connected to a connected account (standard account) which is a connect platform itself
So yeah it can get quite tricky, I haven't tried all of these myself either so there might be more unforeseen complications