#Timothée

1 messages · Page 1 of 1 (latest)

slender rivetBOT
edgy crest
#

Hi! Let me help you with this.

timber fern
#

Great thank you !

#

How can I schedule a subscription to be downgraded to another plan at period end?

edgy crest
timber fern
#

I can just put the end of the billing period timestamp to the phases "end_date" ?

#

Or should I use iterations ?

edgy crest
#

It's better to use iterations. You can set it to 1

timber fern
#

So if the customer is halfway through the current billing period, I can just put 1 iteration for the current plan ?

#

The next phase should be the definitive plan. So basically "infinity" iteration ?

edgy crest
timber fern
#

Hum, I'm not sure because the subscription will be updated immediately instead at the end of the billing period no ?

edgy crest
#

The price will be updated immediately, but the user will only be billed with the updated amount at the start of the new period.

timber fern
#

Yes but our application is enabling / disabling features depending on the current plan so I would prefer that he keeps his plan until the end of the billing period.

#

For example If I do that

stripe.SubscriptionSchedule.create(
    customer="cus_N6jepJKDsc44Ms",
    start_date=1673440421,
    end_behavior="release",
    phases=[
        {
            "items": [
                {
                    "price": "plan_large",
                    "quantity": 1,
                },
            ],
            "iterations": 1,
        },
        {
            "items": [
                {
                    "price": "plan_small",
                    "quantity": 1,
                },
            ],
            "iterations": 1,
        }
    ],
)
edgy crest
#

In this case you will need to use Subscription Schedules

timber fern
#

Is it going to work even if it's halfway through the current billing period ?

#

Another question : Is it possible to do that with the customer portal ?

dark plover
# timber fern Is it going to work even if it's halfway through the current billing period ?

If you already have an existing subscription, then you'd pass the from_subscription parameter when creating the schedule: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-from_subscription

#

Otherwise your schedule will ultimate just create a new subscription

timber fern
#

In the Stripe customer portal. Is there an option to allow customers to downgrade their plans at period end.

#

There is an option to cancel at period end. But I don't see an option to downgrade at period end.

dark plover
#

No, portal doesn't support that today. The upgrades/downgrades are immediate AFAIK

timber fern
#

Ok.

#

Thank you for your help !

dark plover
#

np!

timber fern
#

Have a great day !

dark plover
#

and you