#brayden-schedule-update

1 messages · Page 1 of 1 (latest)

bold prism
#

Hello!

#

Updating a schedule doesn't cause a charge by default so what's the problem?

uneven swift
#

Uh, probably not a problem. Just wanted to understand the best way to do that. I would simply just create a new price object and then update the schedule with that price?

#

Because I can't simply update an existing price, correct?

bold prism
#

correct you can't change a Price's unit_amount

#

are you already using SubscriptionSchedules as an API? Or are you using just Subscription?

uneven swift
#

Yeah we're using SubscriptionSchedules

#

I can send you the one I'm looking at. One second

#

sub_sched_1Kr0uSALivADE4JrThjzRnXg

#

Essentially, I'm trying to edit the current active price, and the next price in the schedule.

#

current active price: price_1LFi2ZALivADE4JrXjKxLUoz

#

Next price: price_1Kr0uSALivADE4JrlpTDquQD

#

Would I just update the schedule with prices that have the same start and end date as these ones and they would get replaced?

bold prism
#

yes!

#

it's a bit annoying code wide but you basically re-send the same phase info and change the price and it wouldn't prorate or anything

#

sorry it would prorate if it's the current phase

#

you could also add a phase if you want to switch to the new price on the next cycle instead

uneven swift
#

Sending a new price for the current period wouldn't charge my customer though?

#

We've basically remediated the customer's bad charges with other refunds at this point, so now we just need to make sure that future changes are being made against a correct priced schedule.

#

So I just want to ensure that changing the current price isn't going to actually charge the customer.

bold prism
#

you can disable proration on that call, or you can defer the Price change to the next cycle (better)

uneven swift
#

So if I were to disable proration on that call, the customer would not be charged. Unfortunately, deferring the price change to the next cycle isn't really an option, as our customer has the ability to change their subscription price at any time. Here, the main issue is that the billing interval needs to change from being billed yearly to being billed every 6 months.

#

Let me ask you this.. would it be easier to just create a new subscription schedule for the customer? Is there a way that I could do that without having the customer charged until the next cycle (Oct 2022)?

bold prism
#

as our customer has the ability to change their subscription price at any time.
I mean if I paid $100 and then move to a $200 Price I have to pay for the price difference

#

otherwise I get new features for free, that doens't make sense in 95% of cases

uneven swift
#

What has happened is, the User has been charged too much. We've then remediated that by giving the customer refunds. So currently the customer has been charged the correct amount.

bold prism
#

okay so yeahin that case you write a script that updates the schedule of all subscriptions, changes the price of the current phase and pass proration_behavior: 'none'

uneven swift
#

At any point the customer can update the price of their subscription (it's completely based on the total price of goods they're insuring with us). We use the current price to tell us how much to refund when the price changes

bold prism
uneven swift
#

So I could, in theory, release the schedule from the subscription, create a new, correct schedule and pass proration_behavior: 'none' when creating, then attach that schedule to the subscription?

#

Then the subscription would have the correct price without actually charging the customer anything until the next billing cycle?

#

I have absolutely no problem with this scorched earth approach lol we do not care about keeping the current schedule at all, just need to get this one customer back on track for any future updates they might make.

bold prism
#

what are you using a schedule in the first place if you have no future phase?

uneven swift
#

We do have a future phase

#

We automatically renew our subscriptions via the schedule

bold prism
#

okay

#

so all you need to do is update the schedule and pass the new information

#

no scorched earth or anything

#

and when you do that you can disable proration for the current phase change

uneven swift
#

Okay, that gives me a lot to go off of. I'll test everything out in the test env and if it all looks good, I'll pull the trigger on it. Thanks for the help!

#

Is there any way I can save this thread?

bold prism
#

it's all public so you can come back here and search for it with your name

uneven swift
#

Okay great. Thanks!