⚡ 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

remi-stripe 2024-07-10
The Invoice is created once you accept the Quote, not on finalization. So after you call the Accept Quote API the `invoice` property will be set and properly expandable. Since this is more an integration support question I'm going to close but don't hesitate to contact our support team if you have any follow-up questions: https://support.stripe.com/contact
cedmt 2024-07-10
Thanks for the quick reply. I figured out that I could get what I need from `expand=['line_items', 'computed.recurring.total_details.breakdown', 'computed.upfront.total_details.breakdown']` Leaving this here for future generations!

Get updates

We publish verified fixes weekly. No spam.

Subscribe