#dammyola
1 messages · Page 1 of 1 (latest)
Hi, let me help you with this.
Thanks
What's the challenge you're facing exactly?
I want to know how to do such integration, maybe a Stripe service that I can look into.
You need to be looking at Connect to facilitate multiparty payments
I've checked the Connect docs and I saw this code.
const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items: [
{
price: '{{PRICE_ID}}',
quantity: 1,
},
],
payment_intent_data: {
application_fee_amount: 123,
transfer_data: {
destination: '{{CONNECTED_ACCOUNT_ID}}',
},
},
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
});
The above code seems to be spilling the amount a user pays at checkout. However, that's not the case with us.
Users can checkout for any of our product/packages but connected account (trainers) don't get paid. They only get paid say $10 for every user they train on the platform.
We are only interested in paying trainers based on the number of users they train.