#maxime1992

1 messages · Page 1 of 1 (latest)

stable egretBOT
orchid cradle
#

What's not specified in the link above is how one user could go from bronze to silver OR bronze to gold directly for example.
at the API level I don't think it matters, you call the API and pass the ID of the specific price_xxx Price you want the subscription to move to

rustic pumice
#

I thought so. My worry with this is mostly how that'd work for balance.

If person A pays for bronze tier yearly, can person A upgrade to gold yearly for example?

If it was the same product with different prices, it'd be an upsell I guess and the difference would be computed automatically to pay only the remaining delta.

How would that work in the case of different products?

orchid cradle
#

If person A pays for bronze tier yearly, can person A upgrade to gold yearly for example?
if you choose to make the API call to make that change for them, yes they can.

If it was the same product with different prices, it'd be an upsell I guess and the difference would be computed automatically to pay only the remaining delta.
I don't think it works that way in Stripe.

How would that work in the case of different products?
it all works the same regardless of what product/price is used.

What happens is, by default, we generate proration https://stripe.com/docs/billing/subscriptions/prorations
The simple example would be

  • you're on a $100 price from Sep 1->Oct 1
  • on Sep 20, you change to a $200 price
  • we calculate "10 days"(Sep 20->Oct1) "percent" of $100, and add that as a negative invoice item(refund of time paid) e.g. -$33
  • we calculate "10 days"(Sep 20->Oct1) "percent" of $200, and add that as a positive invoice item(prorated time on new Price) e.g $66
  • the next invoice on Oct 1 charges $200 + $66 - $33
rustic pumice
#

Ok so proration can be applied to prices that are not on the same products using the API if I understand correctly?

orchid cradle
#

yes

#

there's no restriction on moving between Products or anything like that really

rustic pumice
#

Awesome thanks. And just to wrap up on this, is this achievable with the customer portal that stripe offers?

#

I don't think it's this flexible and I suspect we'll have to build our own UI for this to then use the API.
But please, do let me know if the customer portal supports it that'd be fantastic and a massive win on time and delivery

orchid cradle
#

when you say "it" what exactly are you referring to?

rustic pumice
#

Ah thanks I'll look into it then. I'm guessing the same may be possible with a checkout session eventually?

stable egretBOT
orchid cradle
#

I don't think so no, Checkout is for accepting a payment or creating a subscription, it's not related to updating existing subscriptions

#

I know it has the cross-sell stuff you referred to, but that's all for the use case of creating the subscription initially, for managing existing subscriptions it's mainly handled in the API itself or the Customer Portal hosted surface