The Battle against Chargify Product Versions
Let’s write about engineering shall we? I mean we do a lot of product work at Embedly and rarely do posts about the backend. Today I’m going to write about our battle against product versions within Chargify.
Last week we updated our pricing structures to reflect a $1 price decrease. One late night of QVC and an analysis of everyone else’s pricing plans convinced us that $19 had a better conversion rate than $20 (So far this has held true for us as well).
Making this update in Chargify was a simple of matter of changing the product pricing within Chargify, and like magic people were signing up for $19 plans. The problem came when we wanted everyone to pay the same price.
What Chargify doesn’t explain well is that every time you change a product you create a new version of it. This makes sense. If a customer signs up for a $10 plan and then you up that plan to $20 you usually want to grandfather that customer in. However, if you want all your customers on the most recent version of the product, there is no easy way to do that.
There is a thread on the Chargify support forum that explains what you must do to migrate the subscriptions to the new plan:
Unfortunately, there’s no direct way to change existing subscriptions to the latest version - but you can create a temp product, switch them to that and then switch them back. That will make sure they are on the latest version.
So for every single user, we would have to switch them manually over to a temp plan and switch them back via the Chargify admin. For the hundreds of paying customers we have this would take hours. No. Thank. You.
Instead, I opted to use the Chargify API. What’s incredible is that for a given subscription, Chargify does not pass back the version of the product that the user is on; only the most current one. I’ll say that again. There is no way to know what version of a product the user is subscribed to via the API. Holler.
I created a small script that does all the heavy lifting. You have to first create a testing plan that is $0 with the handle ‘testing’. After that you can run the following:
Done! You have now updated everyone to the correct plan. The first time I ran this script a few customers did not get updated. I don’t know why, but we ended up having to spot check every subscription to make sure that it had the correct version. Annoying, but it only took us about 15 minutes with two people on board.
Hopefully this will save someone else some time when trying to migrate subscriptions to the most current plan.