#sahil_connect-applicationfees
1 messages ¡ Page 1 of 1 (latest)
đ 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.
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.
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;
};
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
@stoic karma oh i assumed the amount and application_fee_amount gets merged automatically
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
You need to use Direct Charges: https://stripe.com/docs/connect/direct-charges
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?
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
See https://www.youtube.com/watch?v=dCL9adgdP0A which explains this flow of funds end to end
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
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
thank you very much I'll update the flow.
sure thing!