#maks25-pricing-model

1 messages · Page 1 of 1 (latest)

hearty lotus
#

Hello 👋

worn ember
#

Hi

hearty lotus
#

yeah you'd have to update the item object with the right quantity

worn ember
#

How do I get the item obj?

#

Within the dashboard that is

#

Oh I see

#

it's the si_XXXXX id

#

Thank you

#

Are the subscription_item_id items completely unique. Or can there be collissions within multiple customers?

hearty lotus
#

I'm not sure about them being unique

#

let me look into them to make sure

worn ember
#

ok thanks

#

And then my last question is regarding prorations

#

We bill based on quantity. So I just want to make sure that whatever the max quantity was in any given month, it gets billed for that.

Ex. A customer had 15 units at the beginning of the month, then 25 unites and then on the last day only 18. I want them to be billed for 25 without any pro-rata.

hearty lotus
#

Are the subscription_item_id items completely unique. Or can there be collissions within multiple customers?
I haven't tested this yet so could be wrong but since the subscription item ids are linked to a subscription which is unique, i'd expect item ids to be unique as well

worn ember
#

ok, thank you

#

What about charging based on the max quantity for the period?

#

Do you know what the setting for that would be?

magic rose
#

I think you are using metered billing for these subscriptions. Is that correct?

worn ember
#

We are using Graduated Pricing

magic rose
#

Can you share a price ID for one of these prices?

worn ember
#

sure

#

one sec

#

I can DM it

magic rose
#

Price IDs aren't sensitive. No one could access it unless they had your Stripe secret key.

#

Okay so the first thing to recognize about this price object. It's licensed, not metered. So this will bill at the start of the period. Not the end.

#

this is the recurring.usage_type property.

worn ember
#

ok, that's good to know

#

We do want to bill in advance.

magic rose
#

So you can change this to usage_type = metered. In that case you can also the aggregate_usage property to set how usage should be aggregated for the billing period.

#

Ex. A customer had 15 units at the beginning of the month, then 25 unites and then on the last day only 18. I want them to be billed for 25 without any pro-rata.

#

How would you know what to bill then?

worn ember
#

Based on the max of prev month

#

actually youre right

#

that doesnt make sense

magic rose
#

Yeah this would need to bill at the end of the period to understand how much to charge.

worn ember
#

I guess the best option is to the pro-rata

#

then*

#

Is there a way not to pro-rata down until the end of the period?

magic rose
#

You mean if they change their subscription amount during the billing period?

worn ember
#

yes

#

Basically what I am trying to accomplish is them paying for the max number of items per month, but billed in advance.

#

So if they go from 20 to 21 items mid month. They would be billed an additional 1 item for that month, mid month

#

But if they then go down from 21 to 20 before the next billing starts, they don't get reinbursed.

#

Obviously on the next cycle if the amount is 20, they will only get charged for 20

magic rose
#

Right, That is the use case for the recurring.aggregate_usage property. It specifies how to calculate the amount to charge.

worn ember
#

I see

magic rose
#

If you use recurring[aggregate_usage]: max that will set the price as the max for that period.

worn ember
#

what obj is that part of? The item obj?

#

Or do I just set it once on the price obj?

magic rose
#

That's on the price object

#

Wait. did I not send that?

#

Hold on

worn ember
#

Thank you

#

Now, if I update the price obj to that. When I update the quantity on the item, I can then leave the parameter proration_behavior out right? Or should I set it to 'none'

magic rose
#

I would run a few tests on this first to make sure the behavior is exactly what you expect.

worn ember
#

Yea that's what I was going to do

#

Thank you so much for your help!

magic rose
#

I hope it works out well for you!

worn ember
#

Thank you