#kobold-auf-kaffee_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1242415262381244477
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hey there
Hi
but this does not seem to work anymore
What specifically isn't working as expected? Can you share some code you're using?
Also, what's the ID of intent/session you need the fees for?
$paymentIntent = PaymentIntent::retrieve(
[
'id' => $id,
'expand' => ['charges.data.balance_transaction'],
], []
);
in the past we received a charges object with the transaction data. What i basically need is after and order has been payed to get the fees we have to pay for this payment
OK, and the $id variable there. Can you share the actual value
$id is the paymentIntendId
I know that, but I need the pi_xxx
i still retrieve the paymentIntend, that works fine, but i don't know how to get the fees for that specific payment
pi_3OmcEkDSpHWf4xq909uLq9nx
It's because that intent was created on a newer API version (2023-10-16) where the charges field is removed, replaced by latest_charge: https://docs.stripe.com/upgrades#2022-11-15
$paymentIntent = PaymentIntent::retrieve(
[
'id' => $id,
'expand' => ['latest_charge.balance_transaction'],
], []
);
Will work instead