#Jenya-subscriptions

1 messages ยท Page 1 of 1 (latest)

tall plinth
#

hi! It should be doing that by default. When you change from one plan to another, the proration items generated is a discount for the unused time on the previous plan and a charge for the remaining time on the new one; any other plans on the subscription are not involved.

kind steppe
#

Like this

#

And problem is when I upgrade it should prorate both

#

But when I downgrade it should change it only in a month

#

But still prorate the metered pricing

#

Uhhh I don't know how to explain it best

#

I also considered doing something like this

#

But it only charges at the end of the billing period

tall plinth
#

trying to understand...

tall plinth
kind steppe
#

Yeah, so like when I downgrade right

#

Let me send code to show how I'm downgrading

#

I do this

tall plinth
#

makes sense. But that call does the change(downgrade) immediately yes

kind steppe
#

Yeah, so it does the downgrade immediately

#

But bills at the end of the month

tall plinth
#

if you want to instead have the change to the plans only happen at the end of the current billing cycle it can be done but you have to use SubscriptionSchedules

kind steppe
#

I need it to have same price for the current month

#

Ah

tall plinth
#

you do the change today

#

we calculate proration and add invoice items for it

#

that proration gets pulled into the next invoice for the customer/subscription(which would be the one at the start of the next billing cycle, usually)

kind steppe
#

So it will change, but it will still count the pricing from the previous plan for the current month?

tall plinth
#

not really sure I follow you

#

the way it works in the simple case (non-metered plans) is :

  • jan 1, using Plan A($100/month). Charges $100 that day
  • jan 21, change from Plan A to Plan B($75/month)like your API call above). No charge today. We calculate 9 days on Plan B, add that as an invoice item, and we calculate 9 days on Plan A, and add that as a negative invoice item.
  • Feb 1, next invoice. We charge $75(upcoming month on Plan B), minus the negative item, plus the positive item.
kind steppe
#

If the customer has usage between Jan 1 and Jan 21 and the user downgrades

#

How will the metered usage be invoiced on Feb 1?

tall plinth
#

why does 'downgrading' mean for a metered plan though? Like are you switching it to a non-metered plan, or are you switching it to a different metered plan, or something else?

#

to be clear, if you have a subscription that has two items, one for a regular price and one for a metered plan, changing the regular plan doesn't do anything to the metered plan as far as I'm aware. In my example above, basically what would happen instead is

  • Feb 1, next invoice. We charge $75(upcoming month on Plan B), minus the negative item, plus the positive item, plus the charge for accumulated usage during January on the metered plan
kind steppe
#

Each product has different pricing

#

$99 + $1/extra

#

$199 + $0.8/extra

#

etc

#

I'm changing both the metered

#

So if I'm on the second plan

#

I replace $199 with $99

#

$0.8/extra with $1/extra

#

But I need it to still count this months usage with the $0.8/extra pricing

#

If you get what I mean :/

tall plinth
#

not sure off the top of my head then, I'd have to test it. I think it's possible we don't let you do that type of change(changing a subscription item from one metered plan to another) since the question of what to do with any reported usage so far is complicated

#

ok seems like it's possible

#

when I do it, what happens is that any usage reported on the old plan instead gets calculated as per the new one ( like here I reported 7 usage on an old plan, then updated the subscription), reported 7 more, and you see the next invoice just takes all 14 together and calculates against the new price

kind steppe
#

For the original month

#

When they downgrade it should basically downgrade in a month

#

So that it calculates price based on the original plan before the billing period ends

tall plinth
#

then yeah, subscription schedules

kind steppe
#

And when it ends it gets moved to new pricing

#

Ah

tall plinth
#

(have to run but my colleague ynnoj can help)

sinful harness
#

๐Ÿ‘‹

kind steppe
sinful harness
#

Let me know if you have any specific questions!

kind steppe
#

Alright