#hevid-medeiros_api

1 messages ยท Page 1 of 1 (latest)

storm schoonerBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

๐Ÿ”— 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/1212035958472450088

๐Ÿ“ Have more to share? You can add more detail below, including code, screenshots, videos, etc.

โฒ๏ธ 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. Thank you for your patience!

spare muralBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

foggy cove
#

Hi there ๐Ÿ‘‹ when working with Subscriptions, the Checkout Session will not directly link to the associated Payment Intent of the first payment, that is instead referenced by the Invoice associated with the session.

I would recommend retrieving the Checkout Session, and using expand to include the associated Invoice object inline with the Checkout Session object. Then you should be able to look at invoice.payment_intent from the Checkout Session object.
https://docs.stripe.com/api/expanding_objects
In this case you would pass invoice to expand, but please let me know if I've misunderstood or that still doesn't do what you're hoping.

compact willow
#

Actually, I need to know the fee

#

May I looking the wrong place.

foggy cove
#

Gotcha, sorry, you said that and I missed it. To do that you will need to go a couple object levels deeper. I'd recommend expanding invoice.payment_intent.latest_charge.balance_transaction. That should allow you to then look at invoice.payment_intent.latest_charge.balance_transaction.fee and invoice.payment_intent.latest_charge.balance_transaction.fee_details.

#

That is the maximum depth that expand can reach (4 levels down), so you would need to retrieve a single Checkout Session for this to work. You won't be able to use it in conjunction with a request to list multiple Checkout Sessions, as there would be one more layer there to step into the list of sessions.

compact willow
#

OK!
Thanks toby!
I hope this works for us