#vineetha_62348
1 messages · Page 1 of 1 (latest)
Yep, that's not supported with express accounts and destination charges. The payment is processed on the platform and therefore liable for the payment fees, disputes, etc: https://stripe.com/docs/connect/accounts#express-accounts
You'd need to manually handle that yourself, perhaps increasing the application_fee_amount to account for our fee if you want to connected account to cover that
Could you please explain ?
Seems like you have some logic to calculate the application_fee_amount based on the payment amount ($cslFee). You should increase the value of $cslFee so that it also covers the processing fees your platform will pay
Team cost : 100(customer pays the amount)
CSL(platform account) : 25
Stripe: 10(assumption)
Tournament director(connected account): 65
Business model is that CSL ( Product Owner) must get $25 . Tournament director(connected account) must get the remaining amount – stripe charge.
This is the requirement
Then that should be pretty straight forward for you to calculate the required amount to pass to application_fee_amount
In your example where Stripe fee is 10 you'd add that to the CSL and it'd become 35
The platform still gets 25 after the 10 fee is deducated, and tournament director (conncted account) will get 65 still
Should be easy enough for you to test out
Ok.Thanks.So before that i need to get the stripe fee amount. $paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $fees,
'currency' => 'USD',
// 'automatic_payment_methods' => ['enabled' => true],
'application_fee_amount' => $cslFee,//csl fee
'description' => $description,
'receipt_email'=> $email,
'transfer_data' => [
'destination' => $CONNECTED_ACCOUNT_ID,//remaining amount to be transferred to the connected account
]
]);
Yep, you'd need to calculate that yourself: https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Is any API for this?
There is not
So how to get strip fee in code?
I sent you a link which explains the formula you can use to calculate it
But it's something you need to calculate yourself. What most people do is just add an arbitary 'service charge' amount which will cover the fee
service charge amount ?
Just an additional fee to cover the Stripe processing fee
Is any method to Retrieve the calculated Stripe fee from the PaymentIntent?
I think I already answered that – no. You can't get the fee for a payment before a payment from the API, you need to calculate it manually
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $fee,
'currency' => 'USD',
'application_fee_amount' => $cslFee, // CSL fee (platform fee)
// Other parameters as needed
]);
// Retrieve the calculated Stripe fee from the PaymentIntent
$stripeFee = $paymentIntent->charges->data[0]->balance_transaction; I found like this code.Is it correct?
Well that will work after the payment has been processed yes, but not before. There's no Balance Transaction until the payment has succeeded
So it's not really much help in your use case
After the payment processed how to split up the fee for platform and connected account?
hi! I'm taking over this thread.
it's the application_fee_amount parameter that defines how much money goes to the platform account (and the rest goes to the connected account)
Team cost : 100(customer pays the amount)
CSL(platform account) : 25
Stripe: 10(assumption)
Tournament director(connected account): 65
Business model is that CSL ( Product Owner) must get $25 . Tournament director(connected account) must get the remaining amount – stripe charge.
This is the requirement
but my current application stripe fee deducted from platform
if you are using Destination Charges, then yes the Stripe fee will be taken from the platform account. if you want the Stripe fee to be taken from the connected account, you may want to use Direct Charges instead.
you can learn more about this here: https://stripe.com/docs/connect/charges
Already express account type implemented for the connected account.Payment intent created as follows $paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $fees,
'currency' => 'USD',
// 'automatic_payment_methods' => ['enabled' => true],
'application_fee_amount' => $cslFee,//csl fee
'description' => $description,
'receipt_email'=> $email,
'transfer_data' => [
'destination' => $CONNECTED_ACCOUNT_ID,//remaining amount to be transferred to the connected account
]
]);
Can i change to the existing code?
if you are using Express accounts, then yes Destination Charges make sense. So it's the platform who will pay the Stripe fees, you can't change this.
you could increate the application_fee to compensate for this if needed.
Can i change the connected account from express to standard via dashbaord
you can't change an account type. but you can create a new standard accounts if needed. however not sure if you can do this from the dashboard.
Hi,Can you provide an example for creating charge in PHP
which type of charge?
so a Destination Charge?
// Team cost
$fee = 100;
// CSL fee (Product Owner)
$cslFee = 25;
// Step 1: Create a PaymentIntent to calculate the Stripe fee
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $fee,
'currency' => 'USD',
'application_fee_amount' => $cslFee, // CSL fee (platform fee)
// Other parameters as needed
]);
// Retrieve the calculated Stripe fee from the PaymentIntent
$stripeFee = $paymentIntent->charges->data[0]->balance_transaction;
// Calculate the remaining amount after deducting the Stripe fee
$remainingAmount = $fee - $stripeFee;
// Create a Charge to deduct the CSL fee from the customer's payment
$charge = \Stripe\Charge::create([
'amount' => $fee, // Total amount including CSL fee and Stripe fee
'currency' => 'USD',
'source' => 'SOURCE_ID', // Replace with the actual source ID (e.g., card token)
'application_fee_amount' => $cslFee, // CSL fee (platform fee)
// Other parameters as needed
], ['stripe_account' => $CONNECTED_ACCOUNT_ID]); // Specify connected account
// Now you can use $charge as needed
$chargeId = $charge->id;
If I do like this my account will work as per my requirement?
it's explained here: https://stripe.com/docs/connect/destination-charges
make sure to select "PHP":