Question

How to cancel Google subscription through the SDK

  • 2 August 2022
  • 2 replies
  • 56 views

Userlevel 1
Badge +1

Google’s new policy needs apps to cancel subscriptions. I am not using any backend (Firebase only). The REST API needs a secret key to do the cancellation which I shouldn’t include in my app’s code.

So how can I do this?


2 replies

Userlevel 5
Badge +8

Hi! 👋🏻 There’s no direct way of doing it through the device. I.e.: there’s no API that you can call directly, either in Google’s Billing client or our SDK. 

The closest thing you can do is to open up the management URL. So you can provide a “manage subscription” button, and then open up the managementURL in the SDK (found in purchaserInfo / customerInfo). 

The user will be able to cancel their own subscription from there. 

 

Hope this helps! 

Userlevel 1
Badge +1

yes it helps, I wasn’t aware that the user can do it himself when the link opens thanks.

Reply