#rbole

1 messages · Page 1 of 1 (latest)

ocean mapleBOT
leaden loom
#

👋 happy to help

#

would you mind elaborating?

tawny cosmos
#

My customer switch from year to month interval, in this case I would like to charge the new price at the end of current period (year)

#

should this be done by proration_behavior:none ?

leaden loom
#

yes and you need to add billing_cycle_anchor: "unchanged"

tawny cosmos
#

ok I will try

#

changeAboInterval StripeInvalidRequestError: Changing plan intervals. There's no way to leave billing cycle unchanged.

leaden loom
#

would you mind sharing the request ID?

tawny cosmos
leaden loom
#

hmmm interesting

#

in that case you might need to use subscription schedules

#

let me just double check one last thing

tawny cosmos
#

ok

#

what should I check ?

leaden loom
#

unfortunately there's no other way than using a Subscription Schedule

tawny cosmos
#

so I can switch from month to year with proration_behavior:always_invoice but I can not switch back at the end of the current period ?

leaden loom
#

yes

tawny cosmos
#

ok, how I have to start to figure this out ?

#

can i retireve the current subscription schedule and update it ?

ocean mapleBOT
pastel yew
#

is there a current schedule or are you asking how to create a new one?

tawny cosmos
#

I have a standard subscription yearly, and later I have to switch back to monthly, but the customer should be paid after the current period, because he has paid for this period and in the next period he wants to switch back the monthly.

pastel yew
#

do you have some code you're currently stuck on?

tawny cosmos
#

yes

#

it's not the code, it's the way how it should work

pastel yew
#

the way it works by default is that when you change a subscription, we calculate and apply proration. Typically if you move from a yearly plan to a monthly one we would calculate a prorated discount for the amount of the reamining year that was already paid, and then that is added a negative amount versus the amount of the upcoming month(so can result in a negative invoice overall).

tawny cosmos
#

I understand, my problem is if the yearly product is cheapter than the monthly product and if the customer switch from yearly to monthly after e.g. 1 month then he would have a not allowed price advantage for this month. How we should handle this situation ?

pastel yew
#

I barely understand you, I'm sorry

#

if you don't want them to recieve a discount then just disable proration by passing proration_behavior:"none" when making the update API call.

tawny cosmos
#

proration_behavior:"none" this is not working and results in the error above.

pastel yew
#

no, that error is because you're passing billing_cycle_anchor: "unchanged",

tawny cosmos
#

ok, true

pastel yew
#

if you change to a monthly plan from yearly, that forces the billing cycle to change to start "now", which is why you can not pass unchanged, doesn't make sense

#

the only way to have that not happen would be to use a SubscriptionSchedule to schedule the change to happen at the end of the current period instead of calling the API directly, for instance

tawny cosmos
#

I try again:
This is my problem: A customer buys the annual product. The annual product is cheaper than the monthly product. The customer switches to the monthly product after e.g. 2 months, then he would have a price advantage for these months because the annual price is cheaper than the monthly price, calculated for the month.

pastel yew
#

ok. And what's the question exactly? You control if the user can update or move between annual or monthly, since they can only do it if you call the API. You can choose to not allow them if you don't want them to. Sorry, I barely understand you.

tawny cosmos
#

ok, you mean we should control the update on our side and allow them to update according our rules.

pastel yew
#

I think that's what I'm getting at, yes.