⚡ 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