#HugoRS

1 messages ยท Page 1 of 1 (latest)

muted voidBOT
warm kindle
#

Hey!

tepid frost
#

Hi ๐Ÿ‘‹ if you're trying to create a Checkout Session to update a Subscription, that is not possible. You will need to build a flow to allow your customers to update their Subscriptions, or alternatively look into the functionality provided by the Customer Portal:
https://stripe.com/docs/customer-management

Manage customer relationships with your business.

warm kindle
#

Alright, so if a user upgrades to another plan the user will have 2 subscriptions?

#

Because we are using bubble.io's plugin right now and there we just select a "update excisting user". We are now changing to our own api calls.

tepid frost
muted voidBOT
warm kindle
tepid frost
#

No, we do not assume that the creation of a new Subscription means all previous ones should be canceled. You will need to add code to provide that logic if that is the flow you would like.
This is the endpoint for canceling a Subscription:
https://stripe.com/docs/api/subscriptions/cancel

There is also an endpoint for updating Subscriptions that you can use, but this approach doesn't come with a hosted UI and you would need to build the upgrade flow into your site/app:
https://stripe.com/docs/api/subscriptions/update

warm kindle
#

Alright, I see. Can we cancel the previous subscription and use the proration_behavior to add the remaining credit to the account. Then use a new checkout?

tepid frost
#

Are you planning to reuse the Customer's existing Payment Method? I think updating the Subscription may be an easier approach if so, and doing so handles prorations in line so you don't have to worry about what happens if a customer has one Subscription canceled but then never starts the next one (in which case they may have been charged for a good/service they didn't receive/have access to).

warm kindle
tepid frost
#

I would suggest taking a look through this doc (it's not too long) about upgrading (or downgrading) Subscriptions, as it goes into a bit more detail:
https://stripe.com/docs/billing/subscriptions/upgrade-downgrade

When it comes to proration calculations though, you have three options:

  • create_prorations: our system will automatically calculate the difference between the old price and the new one based on how far into the billing period the change is made, and will charge the customer for that additional amount at the beginning of the next billing period:
  • always_invoice: similar to the above, but it only calculates the excess amount from the previous payment and immediately creates a new Invoice to process the payment for the new price
  • none: proration calculations are disabled

Learn how to upgrade and downgrade subscriptions by changing the price.

warm kindle
#

Thank you for your help!

tepid frost
#

Any time! I need to step away soon, but if there is anything else my teammates can help with then please let them know. ๐Ÿ‘‹