#rbole
1 messages · Page 1 of 1 (latest)
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 ?
yes and you need to add billing_cycle_anchor: "unchanged"
ok I will try
changeAboInterval StripeInvalidRequestError: Changing plan intervals. There's no way to leave billing cycle unchanged.
would you mind sharing the request ID?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
hmmm interesting
in that case you might need to use subscription schedules
let me just double check one last thing
unfortunately there's no other way than using a Subscription Schedule
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 ?
yes
ok, how I have to start to figure this out ?
can i retireve the current subscription schedule and update it ?
is there a current schedule or are you asking how to create a new one?
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.
do you have some code you're currently stuck on?
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).
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 ?
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.
proration_behavior:"none" this is not working and results in the error above.
no, that error is because you're passing billing_cycle_anchor: "unchanged",
ok, true
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
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.
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.
ok, you mean we should control the update on our side and allow them to update according our rules.
I think that's what I'm getting at, yes.