#mboras-destination-charges
1 messages · Page 1 of 1 (latest)
nvm I asked stupid question
but still I want your suggestion if I'm on right path if you can
Can I write short TLDR of what I am doing with stripe connect and can you tell me is that the best way
Sure!
I am building backend with firebase and web react, mobile flutter.
I am making sport facilites booking app where I want to create for each facility owner stripe express account and I'll act as a middleman and take a cut.
I am using
/**Function to create stripe express account for facility owners */
const account = await stripe.accounts.create({
type: 'express',
country,
email,
default_currency: 'eur',
capabilities: {
card_payments: {
requested: true,
},
transfers: {
requested: true,
},
},
});
/**Function to create stripe account link for facility owners */
const accountLink = await stripe.accountLinks.create({
account: accountId,
refresh_url: 'https://theplayoff.app',
return_url: 'https://theplayoff.app', // TO-DO @markoboras0712 check https://stripe.com/docs/connect/express-accounts#refresh_url
type: 'account_onboarding',
});
For facility owners
For real users who want to book a facility
const session = await stripe.checkout.sessions.create({
mode: 'payment',
line_items: [
{
price_data,
quantity,
},
],
payment_intent_data: {
application_fee_amount: applicationFeeAmount,
transfer_data: {
destination: stripeAccountId,
},
},
success_url: ${getDomain()} /**TO-DO @markoboras0712 @igniti0n deep links */,
cancel_url: ${getDomain()} /**TO-DO @markoboras0712 @igniti0n deep links */,
automatic_tax: { enabled: true },
});
is that legit approach since I tested it and everything works smoothly
am I missing something that I can also benefit from stripe connect and checkout for this
I recommend reviewing the flow of funds we have here: https://stripe.com/docs/connect/destination-charges#application-fee
In the above scenario, the full amount of the Checkout Session is landing in your platform account then transferred to the destination Express account. The Appllication Fee amount is then passed back from the Express account to your platform.
An alternative to this is to not use the Application Fee but instead transfer a smaller amount of funds to the Express account.
mboras-destination-charges
Great