#clarkeash

1 messages · Page 1 of 1 (latest)

past arrowBOT
slate walrus
#

Not as far as I know unfortunately. Are you creating them in the same order but on the actual invoice they show up differently?

tribal mortar
#

The invoice is created from stripe checkout, the items are in a different order to what we have them in on checkout. We have a main plan and then additional plans for metered usage and would prefer the main plan to be the first line item as the metered usage is often $0.00

slate walrus
#

Gotcha, thank you for clarifying. Looking in to whether you can define this order

tribal mortar
#

okay thanks

slate walrus
#

So we say this about line item ordering

sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order
https://stripe.com/docs/api/invoices/object#invoice_object-lines

#

Though I don't know if it is possible to have a chronological order for your Checkout items

#

Have you tried switching up the ordering of what you pass to the API call to create the Checkout Session? I don't think that matters here but it is the only thing I am thinking of that you might be able to change up here

tribal mortar
#

I dont think that will help as the invoice is not just the reverse order of the checkout its quite different to whats on the invoice.

#

Its not a big deal, I wasnt expecting it to be possible

#

Thanks for your help!

slate walrus
#

Yeah, I figured it was a long shot. Am honestly surprised I don't run in to this request more often. I will put in a feature request as this definitely seems like useful functionality