#nivcoo_webhooks
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/1488106907888648256
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hey there ๐ the payment_intent property was removed in version 2025-03-31.basil
any versions before that release will contain invoice.payment_intent
Yes of course for the root "payment_intent " but the doc said that :
https://docs.stripe.com/api/invoices/object?api-version=2025-08-27.basil
But payments.data.payment.payment_intent doesn't exist
the root key "payments" too
ah sorry, thanks for clarifying
this property isn't returned by default, it needs to be explicitly expanded
so if you're looking to get the payments list directly in the invoice-related webhooks, I'm afraid that won't work
Ah :/ so i have to stay with my method to retrieve Invoice from the API ? (With expand payments)
Actually i'm waiting the invoice.paid event and call the api with the same invoice ID
I see - then yes, that's still the current recommended approach
It's not possible to say when we create checkout or subscription that we want this kind of return ? Like when we say that we want "create invoice" ?
sorry not sure I understand - do you mean to specify when creating the session or subscription that you want this to be included in webhooks?
if so, then no I'm afraid that isn't possible
Yes that's what i mean, ok, actually i save in my DB when invoice was paid, payment intent so i'm able to know when i've refund which invoice is related, but now stripe accept multiple payments, what will be the best way to do that ? I mean, retrieve sub_ id or checkout_id or inveoice_id from charge.refunded events
Because with 2023 API i used payment_intent key to link invoice.paid, checkout.complete and charge.refunded events, now i migrate from 2023 to 2025 api and i understand that it's not the best way to do that now
๐ Hey, taking over here, just taking a look
Hello, no problem
So I think your approach of maintaining the linkage yourself is probably the best one in this instance. Also, if you haven't already, it might be worth looking into the Invoice Payment API, which is fairly new: https://docs.stripe.com/api/invoice-payment - This is the new canonical way to represent the invoice/payment relationship, so there might be a way to list invoice payments filtered by a charge or payment intent that works for your use case
Ok thanks I will look into it