#juiceman

1 messages ยท Page 1 of 1 (latest)

elder terraceBOT
chrome agate
#

Hi again ๐Ÿ‘‹ what questions can I try to help answer today?

wheat anchor
#

Hi toby! sorry to bother again

#

same issue as yesterday. i added more detail to the question

chrome agate
#

No need to apologize, I'm always happy to help and it's why we're here ๐Ÿ˜„

#

Sorry, I'm not sure I'm seeing a question provided here. What troubles did you run into combining the flows that we were talking about previously?

wheat anchor
#

i keep running into this issue

#

im not sure how to combine the flows, or if I am even going in the right direction here

chrome agate
#

That looks like a Payment Intent that is in an incomplete state. Is the trouble still coming down to collect payment method details from your customers?

wheat anchor
#

i think so

#

i added all my code and a diagram to the google sheet

#

let me know if you cant access it

chrome agate
#

The problem is here:

Now that the users bank info has been saved, i need a flow to create a charge against their bank account. If this is not correct, please let me know

let paymentIntent = await stripe.paymentIntents.create({
amount: amount,
currency: 'usd',
transfer_data: {
destination: account.id,
},
description: Campaign id is${campaignId}. Campaign name is ${description}
});

This doesn't create a charge against the newly created Connected Account, this creates a Payment Intent that will charge a Customer's Payment Method (once one is provided) and provide the Connected Account with the funds from the payment once it is completed. transfer_data.destination controls where the funds of the payment will be sent.

Did you test this approach, which allows you to charge a Connected Account directly assuming all pre-requisites are met?
https://stripe.com/docs/connect/account-debits

With Connect, your platform can directly debit the Stripe balance of an Express or Custom account.

wheat anchor
#

1 sec

#

yayayayaya

#

thank you!

#

Toby for president 2024

#

thank you!!!

#

now, for the moment of truth

#

now that i have charged one user for the goods, how do I give part of the money to the user that sold the goods

chrome agate
#

Since you aren't charging a Customer, you can't rely on our pre-built flows for that. Instead you'll need to create a Transfer to move funds from your Platform account to the Connected account:
https://stripe.com/docs/api/transfers/create
The destination parameter there controls which account you're sending the funds to.

wheat anchor
#

1 sec

#

ok sorry, im really bad with reading code docs.

so for this snip:

const transfer = await stripe.transfers.create({
amount: amount,
currency: 'usd',
destination: account.id,
});

so to send money to the connected account, all i haved to do is put the account.id of the where to send the money to?

chrome agate
#

Yup, you provide the destination, amount, and currency as those are required parameters, and you must ensure your Stripe account has enough funds in its balance to cover the amount of the Transfer.

wheat anchor
#

1 sec

wheat anchor
#

1 sec

#

is there a way to hold those funds for a certain amount of time? like before sending it to the user that sold the goods?

chrome agate
#

You can avoid making a Transfer, you'll want to speak with your legal advisor to determine if there are any limitations on how long you're allowed to hold those funds in the regions where you'll be operating.

When holding funds in your Platform account, you'll also want to change your account to Manual Payouts to avoid scenarios where Stripe transfers all of the funds from your Stripe balance to your bank account, as you then won't have the funds necessary to cover your Transfers.
https://stripe.com/docs/connect/manual-payouts

Send manual payouts to your connected accounts.

wheat anchor
#

so in the usa i can only hold the funds for 2 days?

chrome agate
#

The table there says 2 years rather than 2 days, but I would recommend confirming with your legal advisor.

wheat anchor
#

oh hahaha, thanks for clarifing that

#

il come back to that later i guess, but thanks for the info

#

when i create a transfer, how do i take 20%?

this is the snip that I am talking about:

const transfer = await stripe.transfers.create({
amount: amount,
currency: 'usd',
destination: account.id,
});

I guess i could create two transfers that sounds weird though

ancient nebula
#

Hello ๐Ÿ‘‹
Taking over as toby needs to step away soon

wheat anchor
#

dang

#

Toby is the best, thank you!

ancient nebula
#

So with a separate transfer, you'd just transfer the amount after deducting your fees

e.g. The transfer amount is $100 and your app fees are 20% then you'd create a transfer for $80

wheat anchor
#

1 sec

#

sorry bad question

ancient nebula
#

Is there anything else I can help with?