#ashrith-invoice-lines

1 messages · Page 1 of 1 (latest)

storm wadi
#

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

plain vigil
#

Just to be clear, Is a line item a invoice iten before it is attached to an invoice?

storm wadi
#

no, thats an invoice item, which becomes a line item

plain vigil
#

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

storm wadi
#

the invoice item might be null if the line came from elsewhere, like a proration etc

plain vigil
#

When you say proration, how will that happen?

#

Or gets generated

storm wadi
#

yea generated eg when you upgrade or downgrade a subscription

plain vigil
#

Without a subscription, can we say invoice_item same as line item?

storm wadi
#

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

plain vigil
#

If we are doing one-off invoice, why can't we say line item same as invoice item?

storm wadi
#

because they are separate objects

#

so they aren't the same thing but tightly coupled

plain vigil
#

Ok, what are the cases for one-off invoicing, where invoice_item field is null in a line_item?

storm wadi
#

i cant think of any

plain vigil
#

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.

storm wadi
#

what are you trying to do when you do that? the item id is a stripe object id, so whats the goal?

plain vigil
#

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.

storm wadi
#

got it, yea for one-off invoices i can't think of how that would be anything but the items you created

plain vigil
#

So for one-off invoices, there are no scenarios I may be missing. Right?

storm wadi
#

not that i can think of, correct.

plain vigil
#

Can an invoice item linked to multiple invoices?

storm wadi
#

nope, it'll just be tied to one

#

i hope that answers your questions

#

i need to step away, so if you have new questions please ask in the main channel 🙂