#squirrel-invoice-metadata
1 messages ยท Page 1 of 1 (latest)
Hello ๐
AFAIK, it should reflect the linked subscription's metadata
https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-metadata
Note that for line items with type=subscription this will reflect the metadata of the subscription that caused the line item to be created.
hmmm. Does the line item inherit the subscription's metadata or the subscription item's metadata? I was hoping it would be the latter but that doesn't seem to be the case
Let me test this real quick
Yeah so the invoice line item inherits the metadata from the subscription itself, but not the subscription line item. I plan to have unique metadata on each invoice line item that I'd like to be inherited from the corresponding subscription line item. Is this possible?
What do you call "the subscription line item"?
squirrel-invoice-metadata
If you look at an Invoice, the lines where type: 'subscription' would have the Subscription's current metadata. But it's not great (it's not a snapshot) so I recommend never relying on this
We're working on a feature that adds the Subscription's metadata on the Invoice to make it clearer
I'm referring to an "item" on the subscription which winds up creating an invoice line item
Ok, I think that feature makes more sense. Subscription metadata > Invoice metadata.
Is there a way to add metadata to the invoice line item upon creation or only via updating an invoice?
Why do you want a metadata on the InvoiceLineItem exactly though I don't get it. Are you explicitly setting different metadata on each SubscriptionItem of your Subscription?
Yes
We're using metadata to track some revenue recognition in a downstream integration to our ERP. It's possible that different line items would have different revenue recognition schedules based on their item types
Gotcha, then this is mostly impossible today. I don't think there's any way for you to control/update the metadata on the InvoiceLineItem in this case
shoot, that's alright. I think we can update the invoice (and therefore the line items) with the metadata after invoice creation. I was just hoping we could do it at creation as well
you can update the invoice. You can not update the Invoice lines
oh really? I was able to update invoice line items previously, but just not subscription line items?
I think you're mixing the vocabulary up
An InvoiceLineItem is a line item on an Invoice. There's no API to update them.
Some of those InvoiceLineItems come from being InvoiceItem that were created separately. Those do have an Update API https://stripe.com/docs/api/invoiceitems/update
I don't think I am mixing up the vocab here. I was using that API to update invoice items previously; however, it was on standalone invoices. Are you saying that this isn't possible on invoices that are attached to a subscription?
An InvoiceItem and an InvoiceLineItem are separate APIs and so is a SubscriptionItem. That's what I'm trying to explain.
๐ I see now. Apologies. I understand the difference between a subscription item and an invoice line item. Are InvoiceItems only editable when an invoice is in draft?
I think you can change metadata after it's finalized too. I'd recommend trying in Test mode.
But that still only works for InvoiceItems, so it will never work for the InvoiceLineItem that come from a SubscriptionItem