@stripe What is the simplest way to charge/credit the prorated amount immediately when upgrading/downgrading a subscription with the same billing interval?
You can use https://stripe.com/docs/subscriptions/upgrading-downgrading#previewing-prorations … to get the amount that would be prorated, then charge them. By default, we prorate (added to the next invoice), so you can disable that withhttps://stripe.com/docs/subscriptions/upgrading-downgrading#disable-prorations …
-
-
The problem with this approach is there are some gotchas. You can calculate the prorated cost, but Stripe auto-charges the invoice immediately when you go from a free plan to a paid plan or when you change billing intervals.
-
The result in those cases is a "Nothing to invoice for customer" error when you obtain the prorated cost and try to invoice it. I can't seem to find a reliable way without hardcoding logic (e.g. which plans are free, which plans are yearly, etc.).
End of conversation
New conversation -
-
-
Just some food for thought. I can't imagine it's uncommon for businesses to want to charge prorated upgrades right away (also prevents confusion of higher bills at the end of each cycle). Cheers from an otherwise very happy customer of six years.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
We'd be happy to help with a specific subscription, if you'd like, at http://support.stripe.com/email !
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That’s where I was headed, but figured it should be easier. If not a flag, maybe an API helped to calculate that without iterating line items would be awesome. Thanks!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The recommended approach has another caveat — if another request comes in (e.g. an authorized user changes the plan or adds invoice items) while these four API requests are happening, things can get borked. There's no way to transact the necessary requests properly.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.