Search code examples
androidgoogle-play-servicesplay-billing-library

Cancel Google Play subscription with Billing API?


Is there a way to cancel a subscription with the Google Play Billing API, specificaly using BillingClient, or I have to do it through the Google Play Developer API? Seems counterintuitive that you can't unsubscribe the same way you subscribed, but I can't find a way to do it. Help please.


Solution

  • BillingClient doesn't support cancellation (not too sure what Google's reasoning was on that one).

    You would have to use Purchases.subscriptions:cancel. I'm not certain, but I believe only the app publisher can call that API; IOW, users can't call it on their own behalf. Clearly there must be an API that works off a user's Google Account credentials, but I don't know what it is.

    An email sent by the Google Play Team on 13 Jun 2018 recommended that users be directed to manage their subscriptions in one of the following ways:

    On Android, open the Google Play Store, then tap Menu > Subscriptions.

    On a computer, go to play.google.com, then in the left menu click My subscriptions.

    On either Android or a computer, use the URL http://play.google.com/store/account/subscriptions to open the user's list of subscriptions.

    For active subscriptions, use the deep-link http://play.google.com/store/account/subscriptions?package=samplePackage&sku=sampleSKU with your package and SKU name to directly open the page to manage the user's specific subscription. Learn more about the manage subscription deep-link by checking out our documentation for subscription-specific features.