#sahil_connect-applicationfees

1 messages ¡ Page 1 of 1 (latest)

tepid cairnBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1216865866298167426

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

patent falconBOT
stoic karma
#

sahil_connect-applicationfees

#

If you charge a Customer $100 and want a connected account to get exactly $72.08 then you should use transfer_data[amount] and not application_fee_amount honestly.

fluid hamlet
#

this is how i create the payemnt intent

const coachPaymentIntent = async (player, coach, lesson, lesson_cost,platform_fee,isFirstTimeInteraction=false) => {
const paymentIntent = await stripe.paymentIntents.create({
amount: lesson_cost,
currency: "usd",
payment_method_types: ["card"],
payment_method: lesson[0].payment_method_id,
customer: player[0].stripe_customer_id,
application_fee_amount: platform_fee,
on_behalf_of: coach[0].stripe_account_id,
transfer_data: {
destination: coach[0].stripe_account_id,
},
confirm: true,
off_session: true,
metadata: {
player_id: lesson[0].player_id,
coach_id: lesson[0].coach_id,
lesson_id: lesson[0].id,
updated_by: lesson[0].coach_id,
intent_by: 1,
...(isFirstTimeInteraction) && {isFirstTimeInteraction: isFirstTimeInteraction},
},
});

return paymentIntent;
};

stoic karma
#

Right now you created a PaymentIntent that will charge the en customer $72.08 USD, send all of that to the connected account and take back $30.89 for yourself. Definitely not what you described

fluid hamlet
#

@stoic karma oh i assumed the amount and application_fee_amount gets merged automatically

stoic karma
#

yeah they don't

#

Also damn you are using Standard accounts. So you are using the completely wrong flow of funds. You have to change this asap

fluid hamlet
#

I'm sorry but I'm a bit confused by standard accounts and direct charges. and I'm not sure if i'll be allowed to change it direct charges can't i use the stripe connect it with the current 'application fee' flow?

stoic karma
#

yeah sorry this can be a bit complx at first. But if you use Standard accounts you should always use Direct Charges. Never use Destination Charges like you are doing

fluid hamlet
#

i do this
if player and coach are scheduling lesson for first time i try to get 30%(inclusive of processing fee) cut of total cost.
if player and coach have a lesson history then i get (2%+processing fee) cut of total cost.

#

i'm watching the video yu shared

stoic karma
#

yeah ultimately if you use Standard accounts, you have to use what I said. You charge the customer $x, the coach (connected account) pays Stripe's fees and you take your own extra cut for yourself as the platform

fluid hamlet
#

thank you very much I'll update the flow.

stoic karma
#

sure thing!