subscription-states

Installation
SKILL.md

Subscription States

A Google Play subscription moves through seven states between the first purchase and final termination. Each state has a concrete access decision: grant, retain until expiry, or revoke. Get the mapping wrong and you either give away paid content or revoke access a user already paid for.

This skill walks you through confirming your app reads the correct state source, deciding the access rule for each state, and writing the mapping code.

Phase 1: Discovery

Before changing anything, confirm where your entitlement decision reads subscription state from. The authoritative source is the subscriptionState field on the SubscriptionPurchaseV2 resource returned by purchases.subscriptionsv2.get on the Google Play Developer API. The client Purchase object from queryPurchasesAsync() does not carry this field.

Answer these questions:

  1. Does your backend call purchases.subscriptionsv2.get (not the legacy purchases.subscriptions.get)?
  2. Does your entitlement function read subscriptionState from that response rather than inferring state from the RTDN notification type?
  3. Does the function check expiryTime when the state is SUBSCRIPTION_STATE_CANCELED?
  4. Does your client code treat a Purchase returned by queryPurchasesAsync() as "has a purchase," not "has access"?

If any answer is no, fix the source of truth first. Inferring state from the notification type is the single most common cause of wrong entitlement decisions, because two different transitions can produce the same RTDN type. For example, SUBSCRIPTION_RECOVERED fires both when a grace period retry succeeds and when a user fixes payment during account hold.

Installs
1
GitHub Stars
42
First Seen
Jun 26, 2026
subscription-states — revenuecat/play-billing-skills