#delgesu1745
1 messages · Page 1 of 1 (latest)
Hey there, can you share the request id?
{
""type"": ""StripeInvalidRequestError"",
""raw"": {
""code"": ""invoice_no_customer_line_items"",
...
""requestId"": ""req_GI2AhWpIfEnFrz"",
""statusCode"": 400
}"
Let's chat here @sweet parrot
Sorry thought I was in the thread
No problem
Taking a look
ok, got it
Are you trying to create empty invoices first then add items before finalizing?
Yes
I want to attach items to invoices.
API docs say you can specify on the items the invoice they belong to
So why can't I create a draft invoice first?
So because your default api version is from 2020, it predates a change in default behaviour here
Ah hahaha
The flow for you version is that you create the invoice items on the customer first before creating the invoice
The new flow as of 2022-08-01 is that you create the invoice first:
https://stripe.com/docs/upgrades#2022-08-01
The pending_invoice_items_behavior parameter on create Invoice no longer supports the include_and_require value. When the parameter is omitted the default value of pending_invoice_items_behavior is now exclude.
Are there any other major changes since our currect verswion that would affect anything?
You can achieve the same behaviour by specifying this explicitly
Set pending_invoice_items_behavior=exclude in your invoice creation request
Then you can get an empty invoice, and add items to it
Ok, perfect. Then I can look over the change log I guess to see if anything on new api version will affect us.