⚡ Solution Summary
- Accept the quote before finalizing to generate the invoice.
- Use expand=['line_items', 'computed.recurring.total_details.breakdown', 'computed.upfront.total_details.breakdown'] for additional details.
- Check the API version compatibility.
### Describe the bug
When I try to expand the invoice in the quote, I still get null in the invoice field of the response. I believe I should get the invoice object. For example for :
```
stripe.Quote.finalize_quote(
quote.id,
expand=['invoice']
)
```
In my stripe dashboard I see that the library actually transformed my list into a object in the JSON. Could this be the cause of the bug or is it a problem with stripe itself?
Request POST body
```
{
"expand": {
"0": "invoice"
}
}
```
### To Reproduce
Create quote (with expand=['invoice'])
Finalize quote (with expand=['invoice'])
Retrieve quote (with expand=['invoice'])
Quote will have invoice set to null in all cases.
### Expected behavior
I expect the invoice field to not be null.
### Code snippets
_No response_
### OS
centos
### Language version
Python 3.10.14
### Library version
10.2.0 and 2.76.0
### API version
2024-06-20
### Additional context
_No response_
Discussion & Fixes