#Andre Liebich
1 messages · Page 1 of 1 (latest)
Hi there, is this question about how much Stripe fee will you be charged?
yes
The Stripe fee is only available after the payment is succeeded.
i know, but i dont find the correct API endpoint for getting the Stripe-Charges
I have a ID like pi_XXXXXXXXXXXXXXXXXXX and a payment_status "payed"
OK, you should first get the latest_charge from the paymentIntent, then
- Get the balance transaction from the charge object (https://stripe.com/docs/api/charges/object#charge_object-balance_transaction)
- Get the fee_details list from the earlier balance transaction
- Check the fee_details list, if the fee's type==stripe_fee, that's the Stripe fee