#basarito-fees

1 messages · Page 1 of 1 (latest)

agile garden
#

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).

valid viper
#

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]?

agile garden
#

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.

valid viper
#

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?

agile garden
#

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 the fee parameter will be the Stripe fee. You can look at the fee_details property if you want more details.

valid viper
#

Ah, okay. So to sum up the things I need are:

  • transaction amount: PaymentIntent.amount
  • application fee: PaymentIntent.application_fee_amount OR PaymentIntent.charges.data[0].application_fee_amount
  • Stripe fee: PaymentIntent.charges.data[0].balance_transaction.fee
    Correct?
agile garden
#

Yes, exactly!