#nivcoo_webhooks

1 messages ยท Page 1 of 1 (latest)

glossy lavaBOT
#

๐Ÿ‘‹ 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.

prime juniper
#

any versions before that release will contain invoice.payment_intent

rotund stump
#

But payments.data.payment.payment_intent doesn't exist

#

the root key "payments" too

prime juniper
#

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

rotund stump
#

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

prime juniper
#

I see - then yes, that's still the current recommended approach

rotund stump
#

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" ?

prime juniper
#

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

glossy lavaBOT
rotund stump
#

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

exotic meteor
#

๐Ÿ‘‹ Hey, taking over here, just taking a look

rotund stump
#

Hello, no problem

exotic meteor
#

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

rotund stump
#

Ok thanks I will look into it