Question

[Flutter/Android] Issues with Downgrading a plan

  • 27 December 2022
  • 4 replies
  • 400 views

Badge +4

We have an app that’s build in Flutter, and it works with both Play Store as well as Apple Store. On both platforms we have set up products (no offerings, or entitlements), as the approach is that the users can buy a product (subscription) and change it at any time.

The Apple Store subscriptions works well (in sandbox mode) and I am able to buy the lowest subscription, then upgrade to higher, and finally downgrade again, without waiting for a subscription to expire.

On Play Store, however, this doesn’t work. I start with the lowest subscription, and then I can upgrade, but if I tried to do another upgrade/downgrade, I get Play Store popup with the following message:

Error retrieving information from the server.

DF-DFERH-01 

Then I get an error from RevenueCat SDK:

PlatformException(2, There was a problem with the Play Store., {code: 2, message: There was a problem with the Play Store., readableErrorCode: StoreProblemError, readable_error_code: StoreProblemError, underlyingErrorMessage: Error updating purchases. DebugMessage: . ErrorCode: SERVICE_UNAVAILABLE., userCancelled: false}, null)

Only once active subscription ends (expires) am I able to change subscription.

I should also point out that when making a purchase, I am setting “Immediate with Time Proration“ mode since I saw on this forum that Android only supports that Proration mode. Regardless of it, it always gives me the same error.

What I’d like to ask is if there is any way I can make Google Play Store subscription to be changed at any point (downgrade/upgrade) so it doesn’t give this error? Am I missing something in the subscription configuration perhaps?


4 replies

Userlevel 4
Badge +6

Hello, thanks for reaching out! 

 

On first inclination it seems that this issue is happening because the UpgradeInfo object isn't being called. Are you using the UpgradeInfo object for the downgrade on Android?

 

In order to perform upgrades and downgrades for Google Play subscriptions, you need to pass the UpgradeInfo object to either purchaseProduct or purchasePackage. The UpgradeInfo is a small object containing the oldSKU (the SKU the user is changing from) and the prorationMode. Proration modes are documented here.

 

 

Badge +4

Hey Michael, thanks for reaching out.

I am using purchaseProduct and calling it as the example below:

Purchases.purchaseProduct(productIdentifier,
upgradeInfo: UpgradeInfo(
oldSKU,
prorationMode: ProrationMode.immediateWithTimeProration,
));

Initially, I am able to buy the lowest subscription, and then make subsequent subscription upgrade with the method above.

Third time when I try to upgrade or downgrade I receive the error I posted in the original post.

oldSku is being sent along with appropriate proration mode, but I am still getting the error.

Userlevel 4
Badge +6

Interesting, for this can you please submit a ticket to support so we can dig deeper into this issue? 

 

To file a support ticket, please follow this link: https://app.revenuecat.com/settings/support

Badge +4

Ticket submitted. Thank you for help so far.

Reply