#marko.nose

1 messages · Page 1 of 1 (latest)

hasty fjordBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

idle crown
#

hi there!

#

not sure to be honest. I recommend testing this in test mode to see if the order is the same or not.

rocky ermine
#

According to our historical data this seems to be the case, but is there way to know if the line items pertains to the flat fee or the units and for what tier is it?

idle crown
#

can you share an example of Subscriptions ID (sub_xxx) so I can look at it?

rocky ermine
#

sub_1NaJKGGySGmb5wxXIFnMqq5c

idle crown
#

thanks! give me a few minutes to look into this.

runic canyon
#

The API reference explains how the lines list is sorted:

The individual line items that make up the invoice. lines is 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

#

It'll be chronologic in regards to when the items were added to the subscription

rocky ermine
#

Thank you.

But so then there is no guarantee regarding the flat price and units consumed price and tiers?

runic canyon
#

Guarantee of what sorry?

rocky ermine
#

In this example the line items for a particular subscription item are then further ordered by the tier of the graduated subscription and in order of the price regarding the units price

#

and then the price regarding the flat amount

#

and if for example the customer would have moved up from the free tier to the paid tier we would then see data regarding tier 2

#

and again first the amount paid for units and then the amount forthe flat fee

runic canyon
#

Why do you expect a different item order to what you're seeing

rocky ermine
#

I do not, just trying to confirm if that is indeed the case so our production code would not break unexpectedly

runic canyon
#

As I've explained, the ordering of items on the invoice uses the logic I shared earlier. That must reflect the ordering of the items on the related subscription, which you can't set/force