Im using in-app subscription in my application. there are 3 subscription available in application i.e, monthly, 6 month and yearly. If user subscribed with monthly I'm showing upgrade subscription on some point. If user try to upgrade its upgrading but after it show pop-up (We are unable to change your subscription plan. Manage subscriptions).But I'm able to get new token and subscription info from the interface(onPurchasesUpdated). Here is the code below using for upgrade.enter image description here

            ) { billingResult, skuDetailsList ->
                try {
                    if (skuDetailsList != null && skuDetailsList.isNotEmpty() && skuDetailsList.size > 0) {
                        val billingFlowParams = BillingFlowParams.newBuilder()
                        val responseCode = billingClient.launchBillingFlow(requireActivity(), billingFlowParams)
                    } else {
                        CommonUtil.toastShow(requireActivity(), getString(R.string.something_went_wrong))
                } catch (e: NullPointerException) {
                    CommonUtil.toastShow(requireActivity(), getString(R.string.something_went_wrong))


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.