#squirrel-invoice-metadata

1 messages ยท Page 1 of 1 (latest)

half larkBOT
minor basin
half larkBOT
austere halo
#

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?

queen abyss
#

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

austere halo
#

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?

queen abyss
#

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?

austere halo
#

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

queen abyss
#

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

austere halo
#

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

queen abyss
#

you can update the invoice. You can not update the Invoice lines

austere halo
#

oh really? I was able to update invoice line items previously, but just not subscription line items?

queen abyss
#

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

austere halo
#

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?

queen abyss
#

An InvoiceItem and an InvoiceLineItem are separate APIs and so is a SubscriptionItem. That's what I'm trying to explain.

austere halo
#

๐Ÿ™ƒ 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?

queen abyss
#

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

austere halo
#

Yeah that makes sense ๐Ÿ˜ข

#

Thanks