When a subscription plan is created in DB, it is synced to create a corresponding product and price on stripe. However, now i want to change the price of a plan. How would I go about changing it on stripe? I have read that we can create a new price and make the old one inactive, but how would we link the new price to the product? And what about existing users? Is it easier done using the dashboard?
Correct, Price objects are generally immutable meaning that fields, such as unit_amount
, cannot be updated after creation. If your intention is to create a new plan and migrate all existing user/subscriptions to the new plan then:
product
parameter.