1
votes

so i'm using InAppBillingService from Google, and i've run into issue.

There is two main type of operation :

  1. Purchase, with which i had no issue, there is Google Play Developer API avialible now, which allows our server to check if purchase was success and so on.

  2. Subscriptions, here i'm totally lost. First of all, by simply no way to cancel customer subscription programmaticaly, second thing is that responce for both purchase and subscription is the same. But i want to have a callback to know, for example, if customer cancelled subscription, or money was transfered to merchant account in correct time.

Question: by reading this post Android In-App Billing Subscription status change callbacks, i've released that question for callbacks wasn't really answered, i hope that there was changes in implementation, which allows me to track payments every period or bubscription cancelation by callbacks. Any help highly appreciated.

1

1 Answers

1
votes

You're right that currently the In-app Billing API does not provide support for programmatically canceling subscriptions from inside the purchasing app. But you can cancel subscription using Google Play Developer API. Before you can use the API, you will need to set up an APIs Console project, create a client ID and generate a refresh token as described here.

There is no callback to know when a subscription is cancelled or renewed. You can track purchaseState of INAPP_PURCHASE_DATA response at app launch.purchaseState is the purchase state of the order. Possible values are 0 (purchased), 1 (canceled), or 2 (refunded). But due to local caching you might not immediately get the right response.