#connect-price-migration
1 messages ยท Page 1 of 1 (latest)
Are you saying that they are all on a different Price but each with the same id price_100 because you kept deleting and recreating it via the old Plan API?
Yes
Literally the price id is 1
We have plans 1,2,3,4 for basic and pro, monthly and annual for each. I have people on all sorts of old payment amounts and want to force them to what we have as the current price amount.
I think we used to be able to go into the dashboard and update the price but cannot anymore. Do we need to make a new price? And i imagine we need to write a script since this is hundreds of customers.
In the past, I think I was OK just updating the price and keeping everyone grandfathered in so just updating the price in the dashboard worked fine up to this point. Now we won't to get everyone on the same amount, for that plan - 19.97/mo
Yes we strongly strongly discourage anyone hardcoding ids, that's why we don't even support this on the Price API
So my advice is
1/ Make a brand new Price for the latest correct amount
2/ Write a script that migrates everyone from the old Price to the new Price
Yeah, I have probably done everything wrong since 2016. But trying to fix it all up now! ๐
The way to do #2 depends a bit on whether you want proration to happen or not and whether you want to defer the change to the next month/year or be immediate
So everyone should stay on the same billing cycle. We are updating annual and monthly plans. So whenever their next billing occurs, we just want it at the higher amount. I will send out an email if they want to cancel before their next billing. No proration needed right?
Okay so the best option is to use SubscriptionSchedules for that. You would create a Schedule from each Subscription and then you'd configure it to add a phase to it so that the Price changes on the next cycle.
That API is a biiiiiiit convoluted right now sadly (it's used for a lot more complex use-cases) but overall it should do what you need
1/ Create a Schedule from a Subscription
2/ Update the Schedule to pass the current phase + add a second phase on the new Price + mark the Schedule to be released at the end
OK, I'm going to save your response and try it out. Thank you!
OK, just checking, is it easier if we just update the subscription on some date? Like write a script that just forces everyone on the 1st of the month to the new pricing and prorates it? Would that be an easier flow? Not ideal but I need to factor in simplicity here.
What's the simplest so we do this correctly. SubscriptionSchedules sounds like it could be high risk of us making an error.
Or, I could just spend 2 days manually switching a few hundred people over in the dashboard to the new pricing plan - not ideal but???
Schedules is not really a high risk of making an error no
ok let me look it over. Thank you.
Like my recommendation is what I said. You're a developer, it'll take you like 2 hours to write a script to do that
but if you want to switch everyone immediately that is easier but it will mess with future upgrades/proration for those customers
ok thanks!
basically you can switch everyone now to the new Price and disable proration, but in 2 weeks if they change Price or quantity again the proration math will be wrong which is unlikely to be what you want ๐ฆ
ok got it.
I'd say try both in Test mode and get a feel for it