Authenticate the service account with the androidpublisher OAuth scope as described for one-time products
Receive the purchaseToken from the client after a subscription purchase or renewal
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}
Inspect the SubscriptionPurchaseV2 response: check lineItems[].expiryTime for the current period end, and subscriptionState (SUBSCRIPTION_STATE_ACTIVE, SUBSCRIPTION_STATE_IN_GRACE_PERIOD, etc.) to determine access
Store the purchaseToken durably and re-query on each session to detect cancellations, pauses, or billing issues in real time
Known gotchas
subscriptionsv2 returns a SubscriptionPurchaseV2 which has per-line-item expiry; the older purchases.subscriptions.get endpoint is still available but provides less granular data for multi-plan subscriptions
Grace period and account hold states still allow content access for a limited time; model each subscriptionState explicitly rather than treating any non-ACTIVE state as lapsed
Linked purchases (e.g. a user who restored purchases on a new device) share the same purchaseToken; do not treat duplicate tokens as fraud
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp