#ashrith-invoice-lines
1 messages · Page 1 of 1 (latest)
hey there
i'm not sure, i suppose if there were somehow no items then it might be null or an empty array (i would need to test). do you have an example of this? invoices without items are not part of an expected flow i'm familiar with
Just to be clear, Is a line item a invoice iten before it is attached to an invoice?
no, thats an invoice item, which becomes a line item
And invoice_item in a line item is unique. Right?
Are there any other types that line_item mapped to in an invoice other tha invoice_item
the invoice item might be null if the line came from elsewhere, like a proration etc
yea generated eg when you upgrade or downgrade a subscription
Without a subscription, can we say invoice_item same as line item?
if you're doing one-off invoice that should be true, yea. each line should map to an invoice item you created.
not the same, but each line mapped to an invoice item
If we are doing one-off invoice, why can't we say line item same as invoice item?
Ok, what are the cases for one-off invoicing, where invoice_item field is null in a line_item?
i cant think of any
Ok. I was planning to use invoice_item in lines on upcoming invoice to cross check if correct invoice is going to generate before generating correct invoice. Just want to be clear on the implementation.
what are you trying to do when you do that? the item id is a stripe object id, so whats the goal?
We are syncing our invoice generation into stripe. Where our structure can't have sepearte line_item without an invoice. And while syncing this, we don't want to make duplicate line_item for the invoice on stripe. So to validate the uniqueness on the invoice lines, we want to use invoice_item field on invoice lines.
We are mapping invoice_item on lines to internally on our line_items stripeId field.
got it, yea for one-off invoices i can't think of how that would be anything but the items you created
So for one-off invoices, there are no scenarios I may be missing. Right?
not that i can think of, correct.
Can an invoice item linked to multiple invoices?