#crow-schedule-startdate
1 messages · Page 1 of 1 (latest)
A subscription schedule is tied to a specific subscription, which in turn is tied to a specific customer
If you're using from_subscription that's the only parameter you should be setting when you create the schedule
a customer can have multiple subscriptions so how does it know which one to attach the phase to
You have to pass in a Subscription ID - that's why I said earlier "A subscription schedule is tied to a specific subscription"
That's only ifyou're not setting from_subscription
yes, how does it determine what sub to put the phase on if I only specify a customer Id with two subs
Let's back up for a second
When you create a Subscription Schedule you have two options:
- use
from_subscriptionwhich needs you to specify a specific subscription ID and that guranantees that the schedule is ONLY for that subscription - create it with all the required params, and that will create a NEW subscription
If you want to add a phase to an existing subscription you need to first create the schedule with from_subscription and then update the created schedule to add a phase
I am trying to add it to an existing subscription, and specify when this phase will end but I get an error "You cannot set start_date if from_subscription is set"
You have to do it as TWO separate requests
- To only set
from_subscription - and then you use the subscripion schedule that was created in the previous requests and update it however you want
why do I have to use two requests
That's just how it works - doing it in one request is just not what we support
You cannot "update" a schedules start date
how do I tell the api when the phase should end and when another should start
Can you share one of your faililng requests so I can see what you're currently doing?
I think I see where I am wrong, you tell the phase when to end. Not the schedule
Can you add a phase to a subscription without a subscription schedule?
No, you can't add a phase w/o a subscription schedule
How do you tell the schedule when the phase will begin?
you can tell it when it will end, but not start?
You can not modify the start date of the current phase
how do I specify its adding a phase?
There's https://site-admin.stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-start_date for the start date of the whole SubscriptionSchedule
After that the phases have to be continuous
crow-schedule-startdate
you cannot use that with from subscription
If you already have a Subscription ongoing then it's already started and you have to define each phases including the current one
how would I retrieve the current phase?
Have you tried first? You seem a bit confused by it and Schedules are tough to grasp at first
My colleague explained what to do:
1/ Create a Schedule from an existing Subscription
2/ Look at that Schedule, it has one phase for the current situation of the Subscription
3/ Update that Schedule to pass both the current ongoing phase and the new phase(s) you want to add after that
I got it ty help
Sure thing! Schedule can be quite confusing when reading the docs until you start really playing with the API. Especially if you use our TestClocks feature: https://stripe.com/docs/billing/testing/test-clocks to see each phase and their behaviour