#fedeb_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/1380189210778009712
๐ 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.
- fedeb_api, 10 hours ago, 10 messages
Hi, release a schedule means that intend to stop scheduling of its phases, but leave any existing subscription in place.
Where do you see the error? Can you share the examep request id so I can confirm that we're on the same page? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_LwfuPST1TZpNho
https://dashboard.stripe.com/logs/req_LwfuPST1TZpNho
https://dashboard.stripe.com/subscriptions/sub_1MStQo2hcBjtiCUZEAgJna2a
"message": "The subscription is managed by the subscription schedule sub_sched_1RRVyY2hcBjtiCUZaSkJOK27, and updating trial_end to 2026-03-15 23:13:08 +0000 is not allowed when the trial currently ends during the phase that starts on 2025-05-30 13:00:00 +0000 and ends on 2026-02-15 23:13:08 +0000. Update the subscription schedule instead.",
Yeah, that is expected since you're trying to update the subscription directly, https://dashboard.stripe.com/logs/req_LwfuPST1TZpNho
that is the erro that Im having, didt release that. (im first testing on sandbox)
I want to know why I cannot extend trial for this production user req_LwfuPST1TZpNho
I dont want to use the API shedules.
so I was thinling if I do release then I can get the old way to just use the API Subscriptions and not API Subscription Schedules. ?
You'd want to use https://docs.stripe.com/api/subscription_schedules/update?lang=curl&api-version=2025-05-28.preview instead
Why do you not want to use that API?
because the "update" method sucks.
I need to send the same phases from the response, with any modification.
since the API does't do a Merge, is doing a replace.
If I send only want I want it will delete any other phases logic since the API is doing a replace.
so every time I will need to interprate what the usar has in each phases and add a lot of code logic to mainten the same data plus the thing I want to do.
with the other regular API Subscription I was just doing something like trial_end=xxxx , prorate= false
I didt care what was the subscription content phases etc. just sending and trial_end date.
--
Imagine this is a backend process I need tu update phases for customer but each customer is unique has his own phases, each one is different.
can have promo code, can have taxes, can have free trial from before, anything is possible.
how I can handle so much scenarios ? is fck hardd
--
is possible to transform the subscription schedules phases that the customer has back to normal subscription?
or once that https://docs.stripe.com/api/subscription_schedules/create?lang=curl is used
is impossible to go back the old way ?
is possible to transform the subscription schedules phases that the customer has back to normal subscription?
no, subscriptions dont have "phases" only the current items/price. that functionality is provided by schedules. as indicated, you can release the schedule and just let the subscription continue with the current items from the current phase, then make any updates you want to it. but the future phases will be discarded in that case.
because the "update" method sucks
I need to send the same phases from the response, with any modification.
I appreciate that the update for schedules are complex, and i don't disagree
But the way this works is that you need to resend those phases to perform the update, because certain kinds of changes also impact other phases, its required to send a complete phase configuration
eg, if you changed the start or end of a middle phase, or iterations etc, it could implicitly affect the phase before/after
how would we know the right way to merge that? how would we communicate back to you that other phases have also been changed?
Its possible we might update this to support a merge-type update in future, but thats currently not supported
So you need to retrieve the current schedule and send the complete phases that include any changes you want, trials or otherwise
I see.
what tips can you give me for "send the complete phases that include any changes you want, trials or otherwise"
for example how to loop phase by phase to know what todo.
for example: case one: I want to extend a trial - case two: I want to add a trial
You're effectively building a new phases array, so that depends on your server SDK, but you'd iterate the existing phases object and reconstruct the new array based on that
for example: case one: I want to extend a trial - case two: I want to add a trial
you would need to determine which phase is the trial and then adjust the start/end according to your need, or for a new trial phase you either convert an existing phase to be a trial or more likely insert a new trial phase at the appropriate time
--
other question that by tech lead is asking.
If a subscription does't have an upcoming phases.
https://dashboard.stripe.com/subscriptions/sub_1REdq52hcBjtiCUZ24cXPO48
but updating trial POST /v1/customers/cus_S8vhRSNJgJouE9/subscriptions/sub_1REdq52hcBjtiCUZ24cXPO48
{
"prorate": "false",
"trial_end": "1779572987"
}
req_skeAWyjCFAOiVy
fails for
"The subscription is managed by the subscription schedule"
if we use https://docs.stripe.com/api/subscription_schedules/release?lang=curl
can we then use POST /v1/customers/cus_S8vhRSNJgJouE9/subscriptions/sub_1REdq52hcBjtiCUZ24cXPO48
without issues? or still we need to use subscription schedule?
asking because our backend only do update trials with POST /v1/customers/x/subscriptions/xx
but recently we execute a script migration price plan using subscription schedule API.
but we did't realize that doing this will affect all our current backend that was only using subscription API and not subscription schedule API.
that would be a big issue for use, to go back to backend and update all our code that use regular subscription API to adapt to subscription schedule.
we did't see anywarning that using subscription schedule make you lead to always use that from now in the future.
schedules are a great way to manage future price migrations, so that's a good setup but yes would require other changes to go through that schedule too.
If your subscription has no future phases, ie the current phase is the only/last phase, then yes you can release it to revert to a subscription without a schedule then make updates directly via the subscriptions API
our backend only do update trials with POST /v1/customers/x/subscriptions/xx
I should point out that subscriptions API updates do no include the customer in the path: https://docs.stripe.com/api/subscriptions/update?lang=curl
curl https://api.stripe.com/v1/subscriptions/sub_123
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I copy the POST that the dashboard tells
or maybe the backend is using an old API version?
Oh yea you are using quite an old api version, from 2014 ๐
If it works for your version, don't worry about that part
thanks
I will try this.
thanks for all the explanations
NP!