#krista_schedule-from-subscription-update

1 messages ยท Page 1 of 1 (latest)

golden mirageBOT
#

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

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

bright juniper
strange swan
#

Oh sorry, I just saw your response!

#

so when I pass from_subscription it says that I cannot pass the start time or the phases. Iwant to switch the pricing to annual at the end of the billing period for this subscription so i need to be able to pass other parameters.

bright juniper
#

Ah, in that case you would need to create the Schedule from the subcription first and then update the phases array to schedule your switch.

#

If you just use the from_subscription parameter, that will return a Subscription Schedule with 1 phase, representing the current price & billing cycle.

#

You can then add a second phase that will start at the end of the current billing cycle that uses an annual price.

strange swan
#

ah ok and adding that second phase will be a second api call to update the schedule correct?

bright juniper
#

Correct

strange swan
#

Ok got it! i will try that and let you know if that worked. thank you so mnuch.

bright juniper
#

You would use the second code snippet in the Create section and then use the API to make the update.

strange swan
#

thank you!!