In App Billing error when upgrading subscription plan - “Error while retrieving information from server [DF-DFERH-01]”
Asked Answered
B

1

10

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.

Blue answered 17/12, 2019 at 4:23 Comment(6)
Happens also here, waiting for an answer :)Shippee
Has this been resolved already? If not: can you explain how are you testing ie is it that perhaps change from 6 months -> 1 year is the last one you are trying? Or is it that you are trying that change right after some other action that might be influencing the outcome? (basically trying to confirm that it is indeed isolated issue). Also what is the exact line of code / API request that fails?Jadajadd
It's completely isolated. Just purchasing a 1 year subscription when the old sku is a 6 month subscription.Blue
Have you found the solution?Skullcap
@MittalVarsani We changed the proration rate. It doesn't make any sense and we couldn't get Google answer on why our chosen proration mode doesn't work in this scenario.Blue
I had exactly the same issue and raised it here: issuetracker.google.com/u/0/issues/176380832. Workaround is using IMMEDIATE_WITH_TIME_PRORATION, which is worse user experience but good enough I suppose.Hessian
C
2

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.

The Documentation

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)

Solution

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.

Cloakanddagger answered 18/8, 2021 at 11:38 Comment(1)
This was our fix as well, except that we found out by trial and error, this documentation was missing.Blue

© 2022 - 2024 — McMap. All rights reserved.