Skip to content

[Android] vpn/leo involuntarily cancellation #43861

Open
@deeppandya

Description

This issue primarily addresses the involuntary cancellation of VPN/Leo subscriptions.

It is a sub-issue of: [brave/brave-browser#37629](#37629).

Since Google Play does not provide specific details about the cancellation reason, we have two possible approaches to resolve this:

  1. Real-time Subscription Monitoring – We can track subscription status in real time to detect cancellations and notify the client to display the appropriate UI.
  2. API Call for Subscription Status – We can use the [Google Play Developer API](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions/get) to fetch the subscription status by passing the purchase token and subscription ID, which the client can provide.

For option 2, the API response includes a cancelReason field with the following values:

  • 0 – User canceled the subscription
  • 1 – Subscription was canceled by the system (e.g., due to a billing issue)
  • 2 – Subscription was replaced with a new one
  • 3 – Subscription was canceled by the developer

Since we are specifically interested in involuntary cancellations (cancelReason = 1), we can use this response to trigger a UI notification on the client side, informing users about the cancellation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions