#beeb_subschedule-subscription-upgrades

1 messages ยท Page 1 of 1 (latest)

tired frostBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270142867247075389

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

mild ocean
#

Hi there

#

Is your goal to change the Price immediately?

marsh oar
#

Ideally the price would change when the current billed month ends, if possible

mild ocean
#

The best way to handle this is with Schedules

marsh oar
#

If not possibile, then the goal would be to set a specific date for the new price to start

mild ocean
#

Schedules would allow you to change the price at the start of the next billing cycle or on a specific future date.

#

Or you can update the Subscription to cancel at period end and create a new Subscription using the new price and have it be in a trial period until the end of the old Subscription's current billing period

tired frostBOT
marsh oar
#

Got it. So if I go the schedule route I would create that schedule for an existing subscription and set it to have a phase that adds in the new price, and then end_behavior be cancel . That then puts into play that new pricing and cancels the original at that time?

crimson token
#

HI ๐Ÿ‘‹

I'm stepping in as my colleague needs to go. Do you want the Subscription to cancel at the end of the phase with the new price or just continue billing the customer?

marsh oar
#

continue billing the customer with that new subscription set up via the schedule. I think the only thing I'm missing on my POST is a start_date, or possibly an anchor date tied to the original subscription that is cancelling

crimson token
#

I agree with my colleague that the easiest way to ensure you do this such that it lines up perfectly with the billing cycle is to use Schedules.

Since you want to keep billing after the first cycle on the new price, you would just specify end_behavior: release. That will remove the Schedule but leave the Subsription as is.

marsh oar
#

Fantastic. I did do similar to the changing subscription portion. I see it created a new subscription for that customer, but it doesn't appear the other one is canceled. Perhaps I just need to time simulate a month forward to see if that indeed takes place though: req_yxHaLdEokJBV7L

crimson token
#

This request is a call directly to the Subscription Schedules API that is only providing a Customer and a Price. This will automatically create a Subscription for the Customer. The end_behavior is set to release so the Subscription created will never cancel unless you explicitly cancel it.

marsh oar
#

I guess I'm missing the object or detail for why the underlying subscription isn't released when the schedule/phase goes into effect. Shouldn't it be creating the schedule to essentially replace the existing one for the customer?

Could just be a param I missed

#

Oh, I missed the subscription param ๐Ÿ˜ข

crimson token
#

Correct. The way it works is, you apply a schedule to an existing subscription and it "schedules" future changes to that subscription. You don't cancel the existing one and create a new one.

So instead of one API call, you would perform 2.

  1. Create a schedule that is attached to the existing Subscription
  2. Update the phases of the schedule to add a second phase with the new price.
marsh oar
#

๐Ÿ‘ Got it. So really two calls will always be needed since these subscriptions aren't on a schedule at prsent. Creation, then update.

Or the other route of subscription update, then cancel of the original for the customer.

Alright I think thats all I needed assistance with. Now to figure out how to accomplish this for 1500+ subscriptions via Postman without having to manually do each one

crimson token
#

Best of luck! I generally recommend using one of our server-side SDKs (I'm a Python dev myself) so you can script these kinds of updates.

marsh oar
#

Yeah I think its time I lean on our ENG team a bit for this. I'm sloppy with code in Postman at best. Thanks for all the help and have a great week!

crimson token
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚