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.
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.
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