10

In my project, few users already purchased subscription product and they are paying every year. We wanted to provide them an one time upgrade(inapp purchase) offer.

When I refer to the android document, it says we can change from one subscription plan to the other one(means change from "yearly plan" to "monthly plan". But is it possible to change from subscription to inapp? And if I do so, does Google play take care of charging user based on the remaining amount in the subscription?

EDIT: I am using IABhelper v3 version of the payment library. This does not have support to upgrade "subscription" product to "inapp" product. When I try to do that I got below error.

enter image description here

Aram
  • 952
  • 1
  • 8
  • 30

2 Answers2

4

No, you can't change the purchase type.

The upgrade or downgrade just can be done between different subscription recurrence interval, because Google Play Store will change between two types of subscriptions. The process is explained on Subscription Upgrade/Downgrade section:

the active subscription is canceled and a new subscription is created.

And we recommend you to use the Play Billing Library to integrate the Android In-App billing into your app. The upgrade should be done using the launchBillingFlow() method, setting the parameters into the BillinFlowParams object, using the addOldSku() method to set the subscription to be replaced and the setSku() method to the target new subscription:

BillingFlowParams.Builder builder = BillingFlowParams.newBuilder()
        .setSku(newSubsSkuId)
        .addOldSku(oldSubsSKUId)
        .setType(SkuType.SUBS);
int responseCode = mBillingClient.launchBillingFlow(builder.build());

If you want to guarantee a permanent feature for your users, instead of changing to an inapp product, you could create a promo code to offer to those users, and then cancel the subscription after they consumed the promo code.

Neto Marin
  • 674
  • 3
  • 15
  • Yes this is what we end up doing. We have asked the user to purchase the "inapp" product and asked them to cancel the subscription renewal. But users are not happy because they are asked to pay before the next due. – Aram Feb 10 '18 at 09:52
0

I strongly recommend android-inapp-billing-v3 library on GitHub. You can do it easily with this library like below.

BillingProcessor bp = new BillingProcessor(this, "YOUR LICENSE KEY FROM GOOGLE PLAY CONSOLE HERE", this);    
bp.subscribe(YOUR_ACTIVITY, "YOUR SUBSCRIPTION ID FROM GOOGLE PLAY CONSOLE HERE");
gencaysahinn
  • 193
  • 2
  • 9
  • I know about this library, but is it supporting upgrade from subscription to inapp? – Aram Jan 16 '18 at 08:22
  • Yes, it is. I also had same thing and I used it. https://github.com/anjlab/android-inapp-billing-v3/issues/234 – gencaysahinn Jan 16 '18 at 08:30
  • No, it looks like Google supports upgrade from one "subscription" product to another "subscription" product. They don't support upgrade from one "subscription" product to another "inapp" product. I got below error "We are unable to change your subscription plan" – Aram Jan 17 '18 at 04:48
  • Google supports upgrade and downgrade subscription. Documentation says "Users can upgrade or downgrade a subscription in the middle of a subscription period. The old subscription's cost is pro-rated, and the unused portion is applied to the replacement subscription.". You can check from this link. https://developer.android.com/google/play/billing/billing_subscriptions.html#overview – gencaysahinn Jan 17 '18 at 07:15
  • 2
    @gencaysahinn is *not* possible to upgrade/downgrade two different product types. As I mentioned on my on my answer, also I added a suggestion about what you could do. – Neto Marin Jan 25 '18 at 17:19