#karina_-subscription-schedule

1 messages ยท Page 1 of 1 (latest)

uncut hearth
#

That's a good question. let me check

dense widget
#

your api leads me to believe not ๐Ÿ˜…

uncut hearth
#

I think that's the field you're looking for

dense widget
#

no, unfortunately that will only release at the end of the last phase

#

i was hoping for the beginning of the last phase

uncut hearth
#

Ah, no. There isn't a way to do that unfortunately

dense widget
#

can i put a request in? schedules are very difficult to work with ๐Ÿ˜ฆ

#

oh wait...

#

i wonder if i can specify that a phase literally lasts like a second ๐Ÿค”

uncut hearth
#

What would you want to happen after that Phase ended? Couldn't you just release the Schedule altogether?

dense widget
#

yeah, so i would have to listen for the schedule update, and then manually release the schedule myself

#

it would be nice if perhaps stripe just did it automatically. it seems a reason to have as schedule is to ensure that a change happens on a certain date. once that change is complete it would make sense that the schedule no longer has a reason to live on ๐Ÿค”

uncut hearth
#

If you're listening for the subscription_schedule.updated event, then you could just code your webhook handler to programmatically release the Subscription for you. Totally hear you though. It would be cool if Subscription Schedules just had an off-switch that didn't require working with the Phases contained within them

dense widget
#

yeah, we will look into that for now. but consider this a feature request ๐Ÿ˜…

#

thanks!

uncut hearth
#

Sure thing! And for reference, if you'd like to make a feature request, feel free to reach out to our support folks: https://support.stripe.com/contact/email

They have workflows that track these types of requests and surface them to the product team.

dense widget
#

it seemed to tick over into the next phase correctly and generate an invoice for the reduced qty

#

but the subscription itself does not appear to have changed... and the schedule is not releasing

#

very interesting ๐Ÿ˜…

#

oh, it seemed to have corrected itself 7 minutes later ๐Ÿค”

uncut hearth
#

Ah! Interesting. So the hypothesis was proven, if a bit delayed then?

dense widget
#

yeah. but that delay is large enough that i would be concerned about race conditions. so it may not be worth it ๐Ÿค”

uncut hearth
#

What type of process is in place that depends on it? Could you have a separate handler that listens for subscription_schedule.released before doing the thing?

dense widget
#

the types of processes that depend on it would all be user triggered

#

and we are basically finding ourselves constantly doing this sort of check: if there is no schedule, update the subscription, if there is a schedule, check if there is an upcoming phase, if not, so something, if yes, do something else

uncut hearth
#

Ahhhh, okay. So theoretically they could navigate to do the thing within the few minutes between when the schedule is released and when the call is actually made to release it

dense widget
#

well that is an exceptional race condition, probably unlikely...

#

but anyways, that is cool, i can check on other things to work with. thanks for rubber ducking