Reputation: 285
I have a Basic and a Premium product and both of them have Monthly and Annual pricing structures following the Good-Better-Best methodology.
Let's say due to increasing costs, I want to raise the price of my Basic Monthly plan by $5 for all subscribers. How can I increase the price of the subscription, and begin charging all current and new subscribers that higher price? From what I understand, Stripe pricing is immutable, but this is not an uncommon thing in the subscription industry.
Example, Netflix increased its pricing for everyone earlier this year. '
Do I need to create a new price under that Basic product and somehow migrate all users to that new price?
Upvotes: 21
Views: 12110
Reputation: 25562
Your intuition was right here. You would create a new Price object with a different id price_ABC
for the new amount. Then you can start by switching new customers to the new Price and seeing how it affects conversion. The Price is associated with the same Product under the hood but it's a new "version" of the Price. That's done by changing your code and ensuring new Subscriptions are created with the new Price.
In the future (though it could be immediately), when you are ready, you can migrate your customers to the new Price. The cleanest approach is to use a SubscriptionSchedule. The idea is that you can define multiple "phases" that a Subscription can go through. That allows to "chain" or "plan" future changes on your Subscription. Your SubscriptionSchedule would have two separate phases:
The advantage of using this approach is that you defer the Price change until the next month so that it reflects exactly what they paid until the next period (end of the month for example). The downside is that it can be a bit harder to manage those objects as they are a bit more complex.
An alternative and sometimes easier approach is to update that Subscription's Price immediately. Doing this would cause prorations as we calculate the difference between what they already paid and what they owe. Usually with migrations like yours you want to disable proration which is done by passing proration_behavior: 'none'
during the update.
You'd need to write code to loop over all Subscriptions using the List Subscriptions API. You can pass the price
parameter to only look at the Subscriptions on that specific Price.
Upvotes: 28