verify subscription

This block is part of the android group and was last modified in core v15.0.0.

verify subscription v15.0.0

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.

In pins 3 + flow
  • 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.

Out pins 8 + flow
  • 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 answers is_active, which is what 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.

Version history

Introduced in v15.0.0.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to android Return to the main group to view all sub-groups Back to android Return to the group to view all blocks within this group