I’m attempting to capture the Stripe Fees per Subscription Invoice using Stripe Billing using the api. I’ve retreieved what I beleieve should be the right field using the following:
const paymentIntent = await stripe.paymentIntents.retrieve(
'pi_123456',
{
expand: ['latest_charge.balance_transaction'],
}
);
const feeDetails = paymentIntent.latest_charge.balance_transaction.fee;`
The value is always returned at 0 however if I view the Balances menu and filter the list by ‘Stripe fee’ there is multiple fees listed but all with a description of ‘Billing – Usage Fee (2024-09-08)’.
Is it possible that the fees are somehow being consolidated or am I looking in the completely wrong place to capture the individual Subscription Invoice fee.
I’m not all that familiar with Stripe and I’d appreciate any support, thanks.
2