Usage-based Billing Proration

97 views
Skip to first unread message

Jason Venable

unread,
May 25, 2023, 6:33:08 PM5/25/23
to Stripe API Discussion
Hello, I have two products with the following pricing:

Product 1) Basic, $150 Base Fee, $5/unit (user)
Product 2) Advanced, $300 Base Fee, $5/unit (user)

A customer can be on the Basic Plan and upgrade to Advanced. I am clearing all usage on Basic (required to remove the price from a subscription) and removing this Basic price from the Subscription. I then add the Advanced price to the Subscription and update the usage from whatever was on the Basic price.

This works, but proration is not applied, and the Subscription is charged the whole $300 even if the customer upgraded with only a few days left in the billing period.

For example, in a billing period of 30 days, and if someone upgraded halfway through the billing cycle, I would expect the following pricing to be charged at the end.

15 days on the $150 plan: $75
15 days on the $300 plan: $150
Total base charge at the end of billing cycle: $225

...but this is not happening, and they are charged $300.

What is the proper way to handle this so the customer is charged $225. Do I need to add a one-time negative charge to the invoice to adjust this manually?

Remi J.

unread,
May 25, 2023, 6:44:41 PM5/25/23
to api-d...@lists.stripe.com
Hello Jason,

With our Billing product, proration only works with Prices that have licensed as their usage_type. If you are using metered instead then there is no proration happening at all during changes. That's partly why we have the clear_usage parameter [2] when you update a Subscription which is required when removing a Price for metered billing to avoid confusion. This makes sure that as the developer, when you remove/change a metered Price you know that the current UsageRecords for that specific Price on that Subscription will not be prorated or transferred and you have to account for that.

A lot of usage billing focuses on counting something like a number of emails or texts being sent. In that world, proration rarely makes sense as you don't charge partially for 15 days and you charge more by volume of emails or texts which is why we don't support this yet. It's a good feature request for us to think about in the future though!

Unfortunately, in the example you described you would have to do this math yourself if you want to charge a prorated amount for a set of usage between two Prices.

Best,
Remi


--
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Jason Venable

unread,
May 25, 2023, 7:58:44 PM5/25/23
to Stripe API Discussion, re...@stripe.com
Awesome, thanks for the clarification. I have a somewhat unique pricing model so I'm okay calculating proration myself. I charge a base fee for usage of the app, and then I monitor how many users use the app in a billing period and charge for those. It is the base price that unlocks more features. You can think of it as "Usage-based licenses"

Screenshot 2023-05-25 at 7.54.04 PM.png
Reply all
Reply to author
Forward
0 new messages