⚡ Solution Summary

  • Use the Invoice's payments property to find associated Charges/PaymentIntents.
  • For PaymentIntent IDs, utilize the List InvoicePayments API.
  • Refer to the updated documentation for detailed guidance.
### Describe the bug Basil API removed the ability to find the corresponding Invoice for a Charge/PaymentIntent. Even if you already have the Invoice ID, retrieving the Invoice doesn't tell you which Charges/PaymentIntents are associated: https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices This is going to be a problem for the Stripe Dashboard too, since the Charge Page has a `Connections` section that lists PaymentIntents and Invoices for the given Charge. Currently the dashboard is using the legacy API version to get around this limitation. ### To Reproduce ``` charge = stripe.Charge.retrieve(charge_id, stripe_version="2024-09-30.acacia") charge.invoice # ok charge = stripe.Charge.retrieve(charge_id, stripe_version="2025-03-31.basil") charge.invoice # fails ``` ### Expected behavior We need some way to associate Invoices to Charges and PaymentIntents. It doesn't matter the direction, via PaymentIntent.id, Charge.id, or Invoice.id... we need some way to associate them. The Stripe Dashboard does too, not just devs. ### Code snippets ```Python ``` ### OS * ### Language version * ### Library version * ### API version 2025-03-31.basil ### Additional context _No response_

Discussion & Fixes

remi-stripe 2025-05-07
@alanhamlett We do still support this but the flow did change. The doc you quoted is the right one and shows all the ways to do this. If you start with the Invoice, it has the `payments` [property](https://docs.stripe.com/api/invoices/object#invoice_object-payments) which now holds the link you are after. If you start with a PaymentIntent id you use the List InvoicePayments API for this. All of those are covered in that doc. This is more an integration support question though so if you have follow up questions please reach out to our support team on https://support.stripe.com/contact or use our Discord server for developers: https://stripe.com/go/developer-chat

Get updates

We publish verified fixes weekly. No spam.

Subscribe