#geordi-tieredbilling
1 messages · Page 1 of 1 (latest)
@rotund fiber hi! I don't that gets exposed anywhere directly in the API as a single value. It's something you can work out though by looking at the tiers on the Price and then calculating the 'discount' and displaying it to the customer in your UI
Ah okay! On the price object when tiers are included - is the main 'unit_amount' representative of the first tiers price? then the tiers object includes the other pricing on the tiers? Stripped down example:
Price object:
{ object: 'price', id: 'price_id', unit_amount: 10000, tiers: [ { ... }, { ...} ] }
I think the top level unit_amount might be the final tier(the "up to infinity" one) but let me test it, I'm not entirely sure
ah you get a null unit_amount instead, if that makes sense.
Ah nice thanks for testing, wondering if we can count on the first object in the array to always be the first tier, then we could use that to perform the calculation against the other tiers
e.g check the up_to quantity, take the corresponding unit_amount and calc against the first tiers unit_amount
yes, it will always in order that way!