#beastboy_code

1 messages · Page 1 of 1 (latest)

buoyant sapphireBOT
#

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

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

bold slateBOT
#

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.

sharp yarrow
#

Code:

const subSchedule = await stripe.subscriptionSchedules.create({
from_subscription: 'sub_1PnQPeDyFtOu3ZuTzXb0ksNN',
});

await stripe.subscriptionSchedules.update(subSchedule.id, {
    end_behavior: 'release',
    phases: [
        {
            items: [
                {
                    price: 'price_1PiIV3DyFtOu3ZuTT7cxqetG',
                    quantity: 1,
                },
            ],
            start_date: subSchedule.phases[0].start_date,
            end_date: endDateEpoch,
            trial: true,
            proration_behavior: 'none',
        },
        {
            items: [
                {
                    price: 'price_1PnPx0DyFtOu3ZuTrMk2CFVm',
                    quantity: 1,
                },
            ],
            proration_behavior: 'none',
            // start_date: endDateEpoch,
            // end_date:
        },
    ],
});
pale acorn
#

that's different than phase level proration behavior: https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-proration_behavior

Whether the subscription schedule will create prorations when transitioning to this phase. The default value is create_prorations. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It’s different from the request-level proration_behavior parameter which controls what happens if the update request affects the billing configuration of the current phase.

sharp yarrow
#

that worked1

#

!

#

Fixed it

#

thank you very much!

pale acorn
#

Happy to help