Our app has 3 possible auto-renewing subscription plans - monthly, 6 months and yearly. They are defined in Google Play and work well when purchasing.
Recently, we've added an option to change plan using the new API - https://developer.android.com/google/play/billing/billing_subscriptions#Allow-upgrade
For downgrades (shorter subscription period), we use DEFERRED
proration mode.
For upgrades, we use IMMEDIATE_AND_CHARGE_PRORATED_PRICE
.
During our tests, we've discovered that all changes work fine, except when changing "6 months" into "yearly". Whenever we do that (user already has 6 month subscription, trying to change to yearly), instead of getting the normal purchase flow, we get an error. The displayed error message is
"Error while retrieving information from server [DF-DFERH-01]"
The actual error code that we receive from the library is SERVICE_UNAVAILABLE
.
Again - all other flows work right, such as monthly -> yearly, monthly -> 6 months.
There is a lack of documentation and clarity about what's going on, and logcat is not showing anything useful.
If the cache and data of Google Play Store (or any other related apps) are corrupt, then the Play Store may fail to access modules essential for its operation and may result in the error DF-DFERH-01. In such a case, clearing the cache/data of the Google Play Store and other related apps may solve the problem.
As far as I can tell from your question, I'd guess that the longer lasting subscriptions have a lower price per month than e.g. the one month subscription.
For the Proration Mode IMMEDIATE_AND_CHARGE_PRORATED_PRICE
the example in the documentation says:
This mode can be used because the Tier 2 subscription price per time unit ($36/year = $3/month) is greater than Tier 1 subscription price per time unit ($2/month).
This suggests that you can only use this mode if the cost per month is increasing by the given upgrade. In the free trial documentation beneath this is mentioned:
Note: This option is available only for a subscription upgrade, where the price per unit of time increases
(I guess they somehow forgot to add this Note also to the first Proration Mode description, because it seems to be a restriction with or without a free trail)
So changing the Proration Mode to e.g. IMMEDIATE_WITH_TIME_PRORATION
or whatever fits your requirements seems to be the only solution (as also mentioned by @SirKnigget in the questions thread), asuming your subscription is not getting more expensive with the upgrade.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With