#skammerens-datter_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/1264897608724254762
๐ 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.
- skammerens-datter_api, 2 days ago, 24 messages
- skammerens-datter_api, 2 days ago, 35 messages
- skammerens-datter_api, 3 days ago, 13 messages
- skammerens-datter_api, 3 days ago, 10 messages
- datter_paymentelement-subscription, 4 days ago, 41 messages
Well you'd just update the schedule to remove the downgrade phase
FYI: so far, api-wise, I don't create schedules for the subscriptions, rather just a schedule if "downgrading" to ensure it happens when the cycle ends, instead of immediately.
What you suggest is that i remove the phase pertinent to "downgrading", so that the schedule exists, but has no effect on the subscription?
Well releasing the subscription from the schedule will also prevent the downgrade, but I don't really understand your concern about that approach
You can just release and then create new schedule when next downgrade happens.
At least this is what I implemented for same issue
My customer can upgrade as they see fit, proration happens and the upgrade is immediate. If they however decide to downgrade, the downgrade should happen when the billing cycle ends, since they paid for e.g. a month, which we don't want to refund. The issue is, that if the customer regrets their scheduled downgrade, they should be able to "cancel" the downgrade. Does that make more sense? ๐
thank you, but wouldn't that just clutter the schedules overview, since it would persist
Then just release the subscription from the schedule and the pending phases will no longer apply. Otherwise just update the schedule to remove the downgrade phase
At least on dashboard I dont see any, not sure if you try to list with api - But I guess that you can filter this someway
If I update the schedule to remove the "downgrade" phase, would the schedule ever go from status of active to something else? I ask, since if I remove the phase, I would like to reuse the schedule afterwards if the customer once again decides to downgrade. Would the schedule ever transistion away from active by itself, if no phase present?
actually never mind; is there instead a way to list all schedules and filter by status?
It would depend on the other phase(s) on the schedule. A basic schedule would run indefinitely unless you have a limited number of iterationbs set or there's an end date
Not via the API, no
following this documentation example, iterations is set to 1:
my code has the same use case as described there under "Change subscriptions".
so I guess my confusion is; how would I best undo that change?
especially since I would like to reuse the schedule, if a new downgrade (or something else to be scheduled) happens
So in that example the schedule would release after 1 iteration of the last phase, and the subscription would just continue to cycle
I think I've already answered that? You'd just remove the phase that handles the downgrade
We might be getting our signals crossed; I'll try to implement it, run some tests, and return if need by ๐
maybe I'll be able to further explain my issue
Yeah I mean some examples objects that demonstrate the issue would help clarify things
In most cases, using the API with test clocks to simulate the advancement of time help explain these use cases
Understood. Also, is there a way to delete a released schedule?
No they can't be deleted. Why do you care about that?
I am trying to determine if a downgrade is scheduled, so that I can update it with the a new phase for other downgrades to update the schedule. In the cases where the schedule has reached its end, I can no longer use the api call to update it. Since I cannot retrieve schedules by customer AND its status as "active", it's a bit confusing to determine if a schedule exists, especially if the api call has a return limit. If hundreds of upgrades and downgrades happen over time, I would have a hard time determining if a schedule exists, or at the very least have a very slow api call to stripe to locally determine the active schedule
Well you'd just check their active subscription(s) (sub_xxx) which will denote whether it is controlled by a schedule: https://docs.stripe.com/api/subscriptions/object#subscription_object-schedule
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That'll give you the sub_sched_xxx that you can retrieve (or exand directly)
very nice; can only one schedule be active for a subscription?
Yes