#ptman
1 messages · Page 1 of 1 (latest)
It will be the fee on the related balance transaction object https://stripe.com/docs/expand/use-cases#stripe-fee-for-payment
Yes, you can expand latest_charge.balance_transaction when making the confirm call and look at the fee on it in the intent that is returned
I'm using the Go api
does Fee include the ApplicationFee? so I need to deduct that or calculate the fee without it from FeeDetails?
Yes our Go library supports all of the fields in our API
No, ApplicationFee is different from the Stripe fee
The application fee is the platform fee that you charge someone else. That field is the fee that Stripe is charging you
excellent
paymentintent.Capture() return *PaymentIntent, but that doesn't have the member LatestCharge, so how do I get access to that?
What version of the Go library are you using? It looks like LatestCharge was added in version 74.0.0 https://github.com/stripe/stripe-go/blob/master/CHANGELOG.md#7400---2022-11-15
If you are using an older API version you may want to use the other version of that code that is on the page that I sent. The one that uses Charges[0].BalanceTransation.Fee
Ah, that explains, I'm still at v73
I expected this to be old stuff that I just hadn't encountered, but apparently it's brand new
Ah, yeah this was part of a very recent change to the Stripe API https://stripe.com/docs/upgrades#2022-11-15:~:text=The charges property,latest_charge property instead.
based on my testing LatestCharge.BalanceTransaction.Fee does include the ApplicationFee