#noe-aviles_webhooks

1 messages · Page 1 of 1 (latest)

fresh groveBOT
#

👋 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/1466153014904488252

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

heady trellis
#

Hi there

#

So this relates to breaking changes in Stripe Billing starting in the Basil API verison. The payment_intent.succeeded event alone won't give you the information you need to tie it to a Subscription. You need to take the PaymentIntent and call the List InvoicePayments api endpoint, providing the PaymentIntent id https://docs.stripe.com/api/invoice-payment/list?lang=curl&api-version=2025-12-15.clover#list_invoice_payments-payment-payment_intent

And you want to expand the InvoicePayment's invoice property in the response which will contain a reference to the Subscription

dire mural
#

That makes sense. I’m currently using the Python library stripe==12.3.0. It seems the library supports retrieving InvoicePayments, but I’m not sure whether an additional API call is required to link the failed PaymentIntent to the associated subscription. Should I upgrade the SDK, or is calling the API directly the intended approach?

heady trellis
#

To be very clear, the endpoint you need here is listing InvoicePayments, not retrieving a particular one.

You can do this with the sdk - it will be something like this:

invoice_payments = stripe.InvoicePayment.list(payment[payment_intent]="pi_3SRFEVHeMN5DH9291g9k1DIM")

#

My python syntax is rusty and I don't if that's exaclty right but you get the point

fresh groveBOT