#alecpope
1 messages · Page 1 of 1 (latest)
Hi there, the stripe fee is only available after the payment is succeeded.
Oh okay, that's no problem. But I don't see a "stripe fee" field where it could be stored inside the payment intent?
You can get it from payment_intent->latest_charge->balance_transaction->fee_details
Ah found it, thanks!
Could you look into this Event evt_3NhQhRCGHYWsrZq50xb90KLm? It does not contain the fee/it is zero, right? Do I need to get the payment intent and expand it?
Yes you need to retrieve the PaymentIntent with latest_charge.balance_transaction expanded
I still get a zero value when retrieving with this request req_typD9sEof7dN5A
Stripe doesn't log GET response, can you copy and paste the response data here?
Ah sorry:
All good.
It looks like you are using the old API, and that's why you have a charges array instead of the latest_charge
In this case you should expand charges.data.balance_transaction
Okay, got it. I think I will update the API and use latest_charge, thanks!
https://stripe.com/docs/upgrades#how-can-i-upgrade-my-api make sure you go though this list before commiting an API upgrade.