A
A
Andrey Myvrenik2016-11-17 11:48:52
Android
Andrey Myvrenik, 2016-11-17 11:48:52

How to upgrade a paid subscription?

I have been digging into the billing API for quite a long time and cannot figure out how to upgrade a paid subscription so that, for example, a monthly subscription is replaced by an annual one. If I use the getBuyIntent() method everything works great. But in the case of getBuyIntentToReplaceSkus() , an empty Bundle is returned (Bundle[EMPTY_PARCEL]).

List<String> oldSkus = new ArrayList<>();
oldSkus.add("some_monthly_subscription"); // Старая ежемесячная подписка

String sku = "some_yearly_subscription"; // Новая ежегодная подписка

Bundle buyIntentBundle = mService.getBuyIntentToReplaceSkus(
                    API_VERSION,
                    mContext.getPackageName(),
                    oldSkus,
                    sku,
                    "subs",
                    developerPayload);

buyIntentBundle.get("RESPONSE_CODE"); // null
buyIntentBundle.getParcelable("BUY_INTENT"); // null

Why? How to deal with it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question