#fedeb_api

1 messages ¡ Page 1 of 1 (latest)

astral riverBOT
#

👋 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/1348733646441287720

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

keen raft
#

complete text:

I'm currently using Schedules API in python.
I grab a subscription, call create schedules, and then I retrive the phases that were automatically created based on the subscription.
Sometimes it has only one phase, sometimes more than one.
Since there are several possible scenarios (free trial days, coupon codes, custom fixes manually by support team, etc.)

What I do is go through all the phases and update OLD_PLAN_NAME to NEW PLAN_NAME depending on the case and call the modified schedule api, this causes the migration to occur immediately or in a future phase, depending on the particular case of each subscription, since everything is done automatically by stripe.

Now I want to do a phase to do the migration in the future instead of the immediate impact, since I have many subscriptions it takes several days to do the instant migration, so I want to execute it a month before even if it takes days, but saying the next month 30 apply this phase that changes the plans.

So how do I add a new phase to the phases I already have?
Im confuse what startdate/enddate should I add in the phases array.

I don't want to modify the billing date, only add a new plan that will start x day and replace the existing plan.

#

--

since phases does't have an id, or order is hard to track or know how to handle, or to add a new one, base on what info?

lethal raptor
#

The docs have examples on how you can do that

keen raft
lethal raptor
#

Yup, when you create a schedule, the returned phase should be the first/current phase