#raul-f_api

1 messages · Page 1 of 1 (latest)

willow owlBOT
#

đź‘‹ 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/1402266530024263740

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

torn drum
#

hi there!

wise depot
#

Hi!

torn drum
wise depot
#

So based on this, what would you recommend I do if I want to determine whether a subscription was programmatically set to end after a period of time, and whether it actually ended at that time?

torn drum
#

if I want to determine whether a subscription was programmatically set to end after a period of time
can you clarify what you mean by this exactly?

wise depot
#

For example, I have a subscription that I want to last for 3 months. What would be the best way to confirm that the subscription actually completed the period I had set?

torn drum
#

you want to be notified when the subscripion ends?

wise depot
#

I’ve got everything set up, but Stripe sends the subscription as canceled in the webhooks—instead of completed (as far as I know, Stripe doesn’t use a completed status for subscriptions). So I was checking the SubscriptionSchedule status to determine if the subscription was completed, but I wanted to confirm that checking this status is a reliable way to know the subscription ended as scheduled

willow owlBOT
untold nebula
#

Hey there, stepping in for soma who needs to step away. Can you share the example subscription ID that you're looking at here?

#

You're referring to two different objects: subscriptions and subscription schedules

#

Schedules can be completed with or without subscriptions being cancelled

#

and subscriptions can be cancelled with or without schedules being completed (or even used)

#

So it really depends on what you're try to do / check for, and an example of what doesnt match your expectations would be very helpful

wise depot
#

And how can I determine if a subscription that was scheduled to end after a certain period actually completed that period as expected, so to speak?

untold nebula
#

Assuming this was set with end_behavior=cancel to cancel the subscription it was controlling, completing the schedule would imply cancelling the sub too

wise depot
#

So you recommend using a combination of both to check if the subscription is completed — if schedule status = 'completed' and end_behavior = 'cancel', right?

untold nebula
#

check if the subscription is completed
This is not a phrase that means something in Stripe language, so I can't really say.

#

If you mean check if the subscription was cancelled then you can check the subscription status for that

#

If you check the schedule status is completed and the end behaviour is cancel, then yes the associated subscription should be cancelled at that point. Are you seeing something different than that happening?