#jcube_api

1 messages · Page 1 of 1 (latest)

ivory islandBOT
hollow veldtBOT
#

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.

ivory islandBOT
#

👋 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/1216995606229287022

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

hollow veldtBOT
lyric forum
#

Since customer balance will be used in the next invoice, so the amount due is zero

versed flicker
#

Is it because when I was testing I had cancelled some subscriptions earlier

#

I upgraded and downgraded few times as well to test

lyric forum
versed flicker
#

Okay.

#

Got it thank you.

lyric forum
#

No problem! Happy to help 😄

versed flicker
#

Why am i getting this error when I'm trying to cancel a subscription schedule error message: You cannot migrate a subscription that is already attached to a schedule: sub_sched_1OtOZySA2e71Dz91yf5gMiNO.

#
        const scheduleId = subscription.schedule?.toString()

        // Cancel the subscription schedule
        if(scheduleId){
            const canceledSchedule = await stripe.subscriptionSchedules.cancel(scheduleId); 
        }```
lyric forum
versed flicker
#

req_C1Jhyt30cx4pvK

lyric forum
#

One subscription can only have one subscription schedule.

sub_1Ot7ijSA2e71Dz91JjJEJhvY has already have an existing Subscription Schedule sub_sched_1OtOZySA2e71Dz91yf5gMiNO. When you attempted to create a new Subscription Schedule in https://dashboard.stripe.com/test/logs/req_C1Jhyt30cx4pvK, the error will be thrown since only one Subscription Schedule is allowed.

versed flicker
#

I'm actually trying to cancel the schedule here

#

await stripe.subscriptionSchedules.cancel(scheduleId);

lyric forum
#

The request above showed you attempted to create subscription schedule instead of canceling one. The above code is likely not where the error is thrown. It should be thrown from:

await stripe.subscriptionSchedules.create(...)
versed flicker
#

Okay lemme confirm

#

You are correct

versed flicker
#

But the cancel method cancelled the whole subscription instead of schedule

lyric forum
versed flicker
#

Okay this will keep the original subscription intact right?

lyric forum
#

Yes!

versed flicker
#

Thank you very much!! @lyric forum