#der_toboter

1 messages · Page 1 of 1 (latest)

steel zenithBOT
woeful heron
#

👋 happy to help

#

for this

Upgrades should be applied instantaneously. Any change is an upgrade if the net amount for one billing period is higher than the one on the old subscription.
Downgrades should only apply with the next billing period.
you don't really need subscription schedules

#

in both cases you should provision the features by listening to the invoice.paid events

#

if the value is subscription_update this means that you need to update the provisioning of your services

#

does that answer your question @subtle birch ?

subtle birch
#

Thank you @woeful heron

This approach is not much different than the solution I suggested.

Let's consider the following case: A customer makes a price/product downgrade, and before the billing cycle ends performs a quantity upgrade. With the solution suggested this would still mean the downgrade is also applied as soon as the upgrade is applied, wouldn't it?

woeful heron
#

no not really

#

because even though the subscription has been updated your provisioning didn't happen

subtle birch
#

With "apply" the subscription I mean listening to the invoice paid event, getting the subscription from the invoice and provisioning the service based on the data of the subscription.
When the upgrade is made in my example above I get the invoice paid event, read the subscription and provision what is in the subscription.
However now the downgrade from before is already part of the subscription and not just the upgrade.

woeful heron
#

With "apply" the subscription I mean listening to the invoice paid event, getting the subscription from the invoice and provisioning the service based on the data of the subscription.
ok, we're aligned on this

#

However now the downgrade from before is already part of the subscription and not just the upgrade.
I'm not sure I understand this part

subtle birch
#

Say on 1st of January I subscribed to the product "Premium" with a monthly billing period, and a quantity of 5.

Now on 5th of January I decide I want to downgrade to "Starter" for the next billing period. This downgrade should be active on the 1st of February.
In Stripe this causes a subscription update without proration and without billing anchor change.

On 7th of January I also increase my quantity from 5 to 7. This is an upgrade and should be applied instantly.
In Stripe this causes a subscription update with prorations and an invoice to be generated.

As soon as the invoice paid event for this update gets processed, the services are provisioned for quantity 7 AND product "Starter".

woeful heron
#

On 7th of January I also increase my quantity from 5 to 7. This is an upgrade and should be applied instantly.
with what price?

#

with Starter?

#

In Stripe this causes a subscription update with prorations and an invoice to be generated.
this happens if you don't override the default behavior

subtle birch
#

with what price?

In customer portal I guess this will already show "Starter", however the customer still has "Premium" and expects to use "Premium" until the end of the period.

woeful heron
#

in your use case the Customer Portal doesn't do the trick for you

#

I recommend not using it