---
title: "verify subscription · RUAL Documentation"
description: "Reads a Play subscription's real state (subscriptionsv2). Use this rather than verify purchase for anything recurring : that one only answers for one-ti…"
canonical: https://docs.rual.nl/block-types/android/androidconnection_verify_subscription
language: en
---

# verify subscription

This block is part of the [`android`](https://docs.rual.nl/block-types/android) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Reads a Play subscription's real state (subscriptionsv2). Use this rather than **verify purchase** for anything recurring : that one only answers for one-time products and 404s on a subscription token.

- flow `flow`

- connection required `androidconnection`

- package name required `value` Android app package

- token required `value` The purchase token from the client. Subscriptions are addressed by token alone : no product id, because one token can cover several line items.

- flow `flow`

- response `object` Google's full subscriptionsv2 response, including every line item.

- is active `condition` True for ACTIVE and IN_GRACE_PERIOD. A grace period is Google retrying a failed payment, not a lapsed subscriber : cutting access there is the common bug.

- subscription state `value` SUBSCRIPTION_STATE_ACTIVE, _IN_GRACE_PERIOD, _ON_HOLD, _CANCELED, _EXPIRED, …

- acknowledgement state `value` ACKNOWLEDGEMENT_STATE_PENDING means you must still call **acknowledge purchase** : Play refunds anything unacknowledged after three days.

- expiry time `value` RFC3339, the furthest expiry across the line items : when access actually ends.

- linked purchase token `value` Set when this purchase replaced an earlier one (upgrade/downgrade/resubscribe); the old token should stop granting anything.

- success `condition`

- error `value`

| `play` |
| --- |
| `google play` |
| `subscription` |
| `iap` |
| `in app purchase` |
| `billing` |
| `verify` |
| `subscriptionsv2` |

The purchase token the app sends is a claim, not proof, so it is checked against Google before any entitlement changes. [verify subscription](https://docs.rual.nl/block-types/android/androidconnection_verify_subscription) answers is_active, which is what [branch](https://docs.rual.nl/block-types/flow/branch) gates on, plus a subscription_state pin that distinguishes a cancelled subscription still inside its paid period from one that has genuinely lapsed. Never unlock on the app saying so: a client can say anything.

![Studio canvas example for the verify subscription block: verifying a Play subscription before unlocking anything.](https://docs.rual.nl/canvas-examples/androidconnection_verify_subscription.png)

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

### Service documentation

- [External API reference](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get): This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.

- [Back to `android`](https://docs.rual.nl/block-types/android): Return to the main group to view all sub-groups

- [Back to `android`](https://docs.rual.nl/block-types/android?group=android): Return to the group to view all blocks within this group
