Ammar
Ammar

Reputation: 1821

Google Play Billing Plan Upgrade/Downgrade with DEFERRED proration mode

In my Android application, we have multiple subscription plans, 1/2/3 months, which offer app features, for different durations, to users. User may switch between different plans during an active plan. E.g. suppose a user opts for 1 month plan. After 15 days of this, user may switch to 3 month plan. Billing for 3 month plan will only happen after the current plan i.e. 1 month period ends. We have credit card billing at the moment but now going to implement Google Play billing as well. For Google play, the deferred billing mentioned at https://developer.android.com/google/play/billing/subscriptions#change seems like the obvious solution to this use case.

val flowParams = BillingFlowParams.newBuilder()
    .setSubscriptionUpdateParams(SubscriptionUpdateParams.newBuilder()
        .setOldSkuPurchaseToken(purchaseTokenOfOriginalSubscription)
        .setReplaceSkusProrationMode(ProrationMode.DEFERRED))
    .setSkuDetails(upgradeOrDowngradeSkuDetails)
    .build();
val responseCode = billingClient.launchBillingFlow(activity, flowParams)  

However, in my experimentation, I found that what I try to switch the plan for first time, the deferred proration mode works well. However, if I try to switch the plan once again during the first plan duration, the Google billing shows an error prompt.

enter image description here

Upvotes: 2

Views: 1873

Answers (1)

Ammar
Ammar

Reputation: 1821

According to Google Play developer support's response, received today, on same query;

The error occurs because there is a current limitation for the deferred proration mode. When there is a pending deferred subscription replacement, no new deferred replacement could be initiated until the previous one is applied.

Upvotes: 1

Related Questions