#CowLover24
1 messages ยท Page 1 of 1 (latest)
Hello ๐
However, then I run into the issue of creating the invoice because the previous way I was creating an invoice was creating an invoiceItem and then the invoice with pending_invoice_items_behavior set to include to get that invoice item. This strategy is including any extra invoice items though which is not what I want.
I don't understand this part exactly.excludeis what you want to create an empty invoice. After that you can add an invoice item
Is there another way of doing this? Like an add invoice items on invoice creation or somthing like that?
There's no way to include only selected existing invoice items when you create the invoice. Its either going to include all existing items OR none
Ohhhh I see what you are saying. I totally overlooked that. I didn't think to make the invoice empty and then add it. I was doing the reverse of that. I was creating an invoiceItem first then creating the invoice including any pending invoice items.
So, what I need to do is create an empty invoice and then add the invoice items after the fact and I should be good?
Yup
Coolio thank you!
You'd pass the invoice ID while creating the item
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-invoice
NP! ๐ Happy to help
Yes, just did that. thank you! Sometimes you just look at this stuff too long and miss the easy solution ๐ Thank you very much have a great day!