thansk for reading
We provide on-demand video streaming that user can purchase via monthly or yearly subscription on android, ios & web
Thus whenever purchases was made on Android, the app send our server a (purchaseToken, subscriptionID) pair, and we use this google developer API to persists the subscription info in our db
Recently, we added support for user to change their plan on Android. On Google side, the money is prorated and the new subscription is created. However, the old subscription's start and end time is still the same on the developer API.
We can't say for sure that the old subscription was cancelled and replaced with a new one because the payload (defined here) only tell you above auto-renew status. Plus the cancel reason of 1 is a blanket for anything that's not user-initiated, not just plan change.
I am making a work around, but it requires knowing a few things, like:
which seems likely, based on this:
Google Play cancels the old SKUs and credits the user with the unused value of their subscription time on a pro-rated basis. Google Play applies this credit to the new subscription, and does not begin billing the user for the new subscription until after the credit is used up.
However, the old subscription's start and end time is still the same on the developer API.
This seems unexpected and could be a bug.
When you switch from a more expensive, longer plan (yearly) to a shorter one (monthly), will all the remaining money be prorated, effectively making your new subscription last longer than its normal duration?
Yes, the remaining balance of the original subscription is applied to the new subscription. The new billing period will start once that balance is used up. This is best explained in the docs here.
When you cancel the newer subscription, will it happen the same way as cancelling a normal subscription? (i.e, the subscription is not auto renewed, but should stay in effect till the end of its duration), or some credit will be stored with Google to be used later?
I believe what will happen is the subscription will not be auto renewed (as you said), but the subscription will remain active until the balance from the prior subscription is used up.