#kboy_schedule-release

1 messages ยท Page 1 of 1 (latest)

silent badgeBOT
#

๐Ÿ‘‹ 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/1287912560846180404

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

mellow ocean
#

The subscription changed on Sep 23th.

#

I thinks the subscription schedule is completed, so status should be "completed".

#

But it's still "active" in API response.

autumn plume
#

What is end_behavior on the SubscriptionSchedule?

mellow ocean
#

let me check

#

end_behavior: release,

autumn plume
#

Can you share an exact example object id? I assume the Schedule hasn't completed yet and it's still in its last phase

mellow ocean
#

โ†‘ is this ok?

#

#still in its last phase" could be.

autumn plume
#

yeah that SubscriptionSchedule still has a phase until October 23

#

it's likely in its last phase and at the end of that phase it releases the underlying Subscription

mellow ocean
#

I see. So, I have another question.

#

In this case, which parameter should I check? I mean i wanna figured wether the last phase started or not

autumn plume
#

check if current_phase maps to the last phase in phases

mellow ocean
#

I see.

autumn plume
#

kboy_schedule-release

mellow ocean
#

I got it!

#

Thank you so much.

#

From my frontend, I wanna get only future schedule list.

autumn plume
#

starting_after is not a date so no it won't work.

mellow ocean
#

oh

autumn plume
mellow ocean
#

Nice

#

So i should make it "scheduled == true"

#

That's I wanted.

#

Thanks again!

autumn plume
#

sure

mellow ocean
autumn plume
#

I'm sorry this is just pictures

mellow ocean
#

I think this has an upcoming phase.

autumn plume
#

Can you share exact code and the exact issue? I don't really get the question and the vocabulary you are using right now

#

I just tried on my end and when I pass scheduled: true I only get SubscriptionSchedules that haven't started

mellow ocean
#

I'm calling like this.

    const subscriptionSchedules = await stripe.subscriptionSchedules.list({
        customer: data.customer,
        scheduled: true,
    });
#

The object is sub_1Q2LYuAMoVLSjIeBskai48Es

autumn plume
#

that's a Subscription, not a SubscriptionSchedule though. Are you maybe mixing things up? If not are you giving the wrong id?

mellow ocean
#

I could be confused...

There is a upcoming phase in the picture I shared, so i think there is a future subscription schedule and get a schedule by this API. But not.

    const subscriptionSchedules = await stripe.subscriptionSchedules.list({
        customer: data.customer,
        scheduled: true,
    });

so, maybe I misunderstand for scheduled: true,

autumn plume
#

yeah I think you did

#

scheduled: true means there's a SubscriptionSchedule that has not started yet. As in it doesn't have any Subscription associated with it and the current_phase would be in the future.

#

Your example looks to be "any SubscriptionSchedule that is ongoing"

#

We don't have a filter for this

mellow ocean
#

I see. I thought that means "the phase "not started yet, but the SubscriptionSchedule.

silent badgeBOT
autumn plume
#

yeah there's no way to filter for that specifically

mellow ocean
#

I totally understand

#

So I should check "current_phase" and check out whether the date is after now or not.

autumn plume
#

Have to run but@hot ermine is taking over

mellow ocean
#

Ok, Thank you, @autumn plume . I appreciate it

hot ermine
#

Hi @mellow ocean I'm taking over, let me know if you have any follow-up questions.

mellow ocean
#

Hi, @hot ermine

Now I wanna display a future subsciption for users on my website.

And, I'm struggling with getting the subscription schedule datas which has only not-started phases.

hot ermine
#

Can you share with me the ID of request that you created to lis the subscription schedules?

mellow ocean
#

sub_1Q2LYuAMoVLSjIeBskai48Es

#

My ideal response from API is,,,

sub_1Q2LYuAMoVLSjIeBskai48Es
โ†’ return a subscription schedule

sub_1Pqn09AMoVLSjIeBXYMI88B1
โ†’ return nothing. (Because the phase already started. it's not future subscription for users.)

hot ermine
mellow ocean
#

Is this you want?

hot ermine
#

Yes, let me take a look

mellow ocean
#

Now, I understand the means of "schduled:true". So I'm looking for another way to filter it for my purpose.

#

I want the subscription schedule datas which has only not-started phases.

#

And I don't want the data already started phases.

hot ermine
#

To clarify, so the request with scheduled:true (req_TsrnDcOfAInqS1) returned you an empty list ? I"m asking because GET responses are not logged

mellow ocean
#

Yes, It's empty.

#

That's because the schdule is already started.

#

But I take care about "phase"

#

I want to filter phases actually.

hot ermine
#

Ok, then that's expected. As the API reference states, it only return "subscription schedules that have not started yet."