#mathieu_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1341698718373515264
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mathieu_api, 1 day ago, 26 messages
๐ happy to help
when you create the schedule from the subscription https://dashboard.stripe.com/logs/req_AwhaiY6ftrAHuA the first phase start date is 2025-02-09 but when you update you're passing 2025-01-09
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
How can I find the start phase date using API ?
it's in the Subscription Schedule
current_phase.start_date
you can also find it in phases[0].start_date
it might also be useful to use iterations instead of phase.start_date & phase.end_date
in your case since you want the change to happen after the current cycle, you can set the iterations to 1
So instead of
{ "phases": { "0": { "end_date": "1741520606", "items": { "0": { "price": "price_1MzGV6Deg55eSBYjqmQNgV22" } }, "start_date": "1736423006" }, "1": { "items": { "0": { "price": "price_1MzGUODeg55eSBYjXMr8KF7O" } }, "start_date": "1741520606" } } }
I can use
{ "phases": { "0": { "items": { "0": { "price": "price_1MzGV6Deg55eSBYjqmQNgV22" } }, "iteration": 1 }, "1": { "items": { "0": { "price": "price_1MzGUODeg55eSBYjXMr8KF7O" } }, "iteration": 1 } } }
?
yes correct
and that would release the schedule after the iteration of the second phase, keeping the subscription active with the new price
I have the error :
{"status":400,"message":"The subscription schedule update is missing at least one phase with a start_date to anchor end dates to.","request_id":"req_JfTe3xXkHTuIKm","request_log_url":"https://dashboard.stripe.com/logs/req_JfTe3xXkHTuIKm?t=1739956991","type":"invalid_request_error"}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
oh yes, you just need the first phase to have the same start_date as the current 1st phase of the schedule
{
"phases": {
"0": {
"start_date": sub_sched.phases[0].start_date
"items": {
"0": {
"price": "price_1MzGV6Deg55eSBYjqmQNgV22"
}
},
"iteration": 1
},
"1": {
"items": {
"0": {
"price": "price_1MzGUODeg55eSBYjXMr8KF7O"
}
},
"iteration": 1
}
}
}
Iteration is usefull on first phase ?
yes so you don't have to calculate the end_date
And on second phase, I dont want subscription end until the suer unsubscribe. Iteration: 1 is ok ?