Subscriptions means subscriptions made via Google Play In App Billing
Revoke here means
- cancel the subscription and
- refund the user for his subscription
as described in the method documentation.
This was developed as a quick one-shot-solution for the aforementioned specific problem, thus it will not be developed any further and does not contain tests.
-
Install Kotlin-plugin for IntelliJ
-
Provide data in the
customer_data.csv
file as a CSV containing (per line):subscriptionId,token
subscriptionId
it is the ID of the product the user bought, e.g. 'monthly001')
token
is provided to the device by the In-App-Billing API and probably be saved to your backend
-
Provide the
key.p12
key file needed for authentication with the Google Play service account. This file can be downloaded from the Google Api console. Has to be put in the resources folder alongsidecustomer_data.csv
-
Provide
app name
,app package name
,service account email
(can be found in your Google API console) inValues.kt
-
Run
Main.main()
. The script will read fromcustomer_data.csv
and revoke them one by one. Logs can be found inrevoker_logs.txt
in the project folder.