Search code examples
androidgoogle-playin-app-billingdeveloper-consolein-app-subscription

How to cancel test subscription in Google play developer console


I initially had test accounts for testing in -app purchases in android but I since removed the testing accounts and moved the app from beta to production. Both test accounts have attempted to cancel their test subscriptions through the Google play app according to documentation. Although the Google play app says the subscription had canceled, it still remains active. Even with trying to uninstall the app. How can I remove the test subscriptions?

I have removed the beta test apk from the Play Store and disabled testing. I have removed all testing accounts from the licensing page as well as the authorized beta testers list. Beta test users are still reporting having an active (daily) test subscription. No matter how many times they hit cancel, it still renews the next day. I need to get this removed. It is hindering our development process.


Solution

  • Assuming you're testing with real transactions where you got a token when you subscribed, you can try cancelling subscription using Google Play Developer API > Cancel Subscription

    Purchases.subscriptions: cancel

    Cancels a user's subscription purchase. The subscription remains valid until its expiration time.
    

    HTTP request

    POST https://www.googleapis.com/androidpublisher/v2/applications/packageName/purchases/subscriptions/subscriptionId/tokens/token:cancel

    where

    packageName string The package name of the application for which this subscription was purchased (for example, 'com.some.thing').

    subscriptionId string The purchased subscription ID (for example, 'monthly001').

    token string The token provided to the user's device when the subscription was purchased.

    The API requires authorisation.

    Also check this

    Canceling completed test purchases

    Google Play accumulates completed test purchases for each user but does not pass them on to financial processing.

    In some cases, you might want to manually cancel a test purchase to continue testing. To do so, open the app page in the Play Store. If the test purchase that you want to cancel is a subscription, you can also use the cancel() method of the Purchases.subscriptions API.