#captainnoyaux_docs
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260261903066730591
đ Have more to share? Add 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.
- captainnoyaux_docs, 49 minutes ago, 40 messages
- captainnoyaux_docs, 1 day ago, 30 messages
- captainnoyaux_docs, 1 day ago, 12 messages
My problem is related to this
https://discord.com/channels/841573134531821608/1260231909854941365
If I try to update the phase to remove the last phase, the "iterations" field is lost
so my new phase keeps going for ever
unless I update the number of iterations manually myself
I didn't find a way to get the number of iterations/ iterations left to the phase
Hello, can you tell me more about what you mean by "minimum commitment period" and what your subscription schedules are doing instead?
I want a subscription where a user has to stay/pay for a certain amount of time (e.g. 3 months) after that he can cancel whenever he wants. If he cancel before that he still needs to be charged for the subscription until the x months have passed
In order to do that stripe support told me to use Subscription schedules
when the user cancels I wanted to remove the second phase after the "commitment phase" but doing so updates the commitment phase to an infinite phase unless you manually reset the number of iterations needed
How are you controlling whether the user can cancel their subscription or not? Are you basing this on metadata that the schedule manages or something similar?
I have the info in a database linked to the subscription
I save the minimal date before he can cancel
I am still not quite putting together how you are trying to implement this. Can you lay out how exactly you set this up, what exactly your subscription schedule phases look like, and where this is going wrong?
Absolutely, when the customer subscribe I create a subscription schedule out of the subscription.
I add two phases, one of 3 months and one without iterations. I call the SubscriptionSchedule update function to push it to stripe
when the user wants to cancel his sub, if he is still in the first phase I wanted to update the subscription schedule to remove the last phase and have it finish the first one
but that doesn't work because you can't just remove the last phase you have to recreate the first phase too
or if you can just remove the last phase I didn't find it
Ah gotcha, that is helpful. Yes, we expect you to always pass all of the phases when updating the subscription schedule. So we would expect you to pass just the first phase in the phases parameter when you make this update. If the first phase is complex enough that you can't reconstruct the phase, it may be helpful to retrieve the schedule first or to cache more info on your side so that you can recreate it
that's what I'll do, is the commitment period something people do with stripe ? Do you have videos or w/e about it ? It's odd that I didn't find anything about it as it's a pretty common use case
and to manage it by hand is bothersome
It isn't a built in thing that we have unfortunately and we don't have documentation on building something like this. The subscription schedule approach is a good one, that is the only way to have the subscription automatically cancel that far out. Standard subscription objects do have a cancel_at parameter where you can set an arbitrary timestamp for the sub to cancel at, but that would require calculating the exact time the subscription would cycle three cycles from now. https://docs.stripe.com/api/subscriptions/object#subscription_object-cancel_at
I do get that this is bothersome, if you write in to our support again they can file a feature request around this. We can't guarantee if or when that would be added but that could still be a helpful thing to file.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah a feature request would be great
cancel_at has problems on it's end too, how can I calculate the time three cycles from now ?
Can't I just take start_date and add 3 months to this value in epoch and it'd work ?
hello, I'm stepping in. That should work, give it a try in test mode? I ask cause your use-case is very specific so trying it out quickly is best to validate but
take start_date and add 3 months to this value in epoch and it'd work
should work
Thanks for the reply, is there a way to test it quickly in test mode ?
I can manually change the values in the dashboard and simulate the passage of time ?
yes you can use Test Clocks, Dashboard should support some/most of this, not sure as I don't use the Dashboard flow myself too much
Well maybe it's feasible, I'll check that when I have time, thanks
np!
it doesn't seem to work from a quick update from the dashboard
ah then using the API would be the other option, this should be repro'able from API