#basarito-fees
1 messages · Page 1 of 1 (latest)
Hi! The PaymentIntent has a Charge object, and the Charge object has a BalanceTransaction object.
On the PaymentIntent and Charge object you can find the application_fee_amount (the amount the platform will get)
On the BalanceTransaction you can find the fee (the Stripe fee paid by the connected account).
Hi, thanks for the quick reply. I've been looking at that too, but this line threw me off. Is there always only one successful charge per PaymentIntent? And I can expect it to be in the charges.data[0]?
Is there always only one successful charge per PaymentIntent? And I can expect it to be in the charges.data[0]?
Yes to both questions! Charges is an array because you could have some failed charges.
Oh, okay! In that case, all the information I need would be on the balance transaction object like you said.
However, I still don't quite understand this part: BT object has type which could any of application_fee, stripe_fx_fee, stripe_fee etc. but fee_details also has a type which could be application_fee, stripe_fee or tax. So which one should I be looking at to get total Stripe fees for that payment?
It seems like fee could also include application_fee?
The platform account will get an ApplicationFee object, and this one will have a BalanceTransaction object with type: application_fee
So which one should I be looking at to get total Stripe fees for that payment?
Simply look at the BalanceTransaction of the charge, and thefeeparameter will be the Stripe fee. You can look at thefee_detailsproperty if you want more details.
Ah, okay. So to sum up the things I need are:
- transaction amount:
PaymentIntent.amount - application fee:
PaymentIntent.application_fee_amountORPaymentIntent.charges.data[0].application_fee_amount - Stripe fee:
PaymentIntent.charges.data[0].balance_transaction.fee
Correct?
Yes, exactly!