#amanda688_subscription-changes-schedules

1 messages ยท Page 1 of 1 (latest)

frosty coveBOT
#

๐Ÿ‘‹ 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/1281312304192950274

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

subtle wing
#

Hi ๐Ÿ‘‹

The most straightforward way to do this, in my opinion, is to use Subscription Schedules
https://docs.stripe.com/billing/subscriptions/subscription-schedules

To achieve this you would

  • create a Subscription Schedule from a Subscription - https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
  • Add a second phase with trial: "true" and set the end_date 2 months from the end of the current phase (the 1 year billiing cycle)
  • Add a third phase going back to the same Price ID as the first one that starts after the 2 month free period.
  • Specify end_behavior: "release" when creating the Schedule. This will ensure that, when the last phase is reached, the Subscription Schedule will end but the subscription will keep billing.
idle jetty
#

Awesome! Thanks so much. ๐Ÿ™‚

subtle wing
#

Those are lot of details on the steps, but the core idea is that Subscription Schedules allow you to schedule changes to your Subscriptions. This allows you configure changes well in advance.

idle jetty
#

Thanks -- I could see a couple ways to do it but I wanted to double check on which was the cleanest. ๐Ÿ™

subtle wing
#

I also recommend you test this flow out. You can use our Test Clocks feature which will let you simulate advancing time to make sure all the Invoices are generated when you expect them, for the amounts you expect.

https://docs.stripe.com/billing/testing/test-clocks

#

I wanted to double check on which was the cleanest

Subscription Schedules can be tricky because they don't upate the way normal Subscriptions do. When you pass new data to the phases parameter, it overwrites the current data instead of adding to it.

But once you get the hang of that, I think they are a powerful tool that allows you to build complex behaviors in a safe way (instead of having to make your API calls exactly at the right time).

idle jetty
#

Yeah, I've kind of shied away from them in the past after reading through the docs but I'll take a closer look ๐Ÿ˜‚

subtle wing
#

It's much easier to avoid accidental prorations when you use schedules because you can schedule your changes to occur exactly at billing cycle end times.