Android · Schema

SubscriptionPurchase

Represents a subscription purchase. Contains the subscription state, expiry time, auto-renewal status, and cancellation details.

Artificial IntelligenceAndroidAutomotiveGoogleMachine-LearningMobile DevelopmentSDKTVWearables

Properties

Name Type Description
kind string Resource type identifier.
startTimeMillis string Time at which the subscription was granted (milliseconds since Epoch).
expiryTimeMillis string Time at which the subscription will expire (milliseconds since Epoch). For cancelled subscriptions, this is when access ends.
userCancellationTimeMillis string Time at which the subscription was canceled by the user (milliseconds since Epoch). Only present if cancelReason is 0.
autoRenewing boolean Whether the subscription will automatically be renewed.
priceCurrencyCode string ISO 4217 currency code for the subscription price.
priceAmountMicros string Price of the subscription in micro-units of the currency. For example, 7990000 represents $7.99.
introductoryPriceInfo object
countryCode string ISO 3166-1 alpha-2 country code of the user at the time the subscription was granted.
developerPayload string Developer-specified string for additional information.
paymentState integer The payment state of the subscription. 0 = Payment pending, 1 = Payment received, 2 = Free trial, 3 = Pending deferred upgrade/downgrade.
cancelReason integer The reason a subscription was cancelled or not auto-renewed. 0 = User cancelled, 1 = System cancelled (billing issue), 2 = Replaced with a new subscription, 3 = Developer cancelled.
linkedPurchaseToken string The purchase token of the previous subscription if this subscription is a replacement (upgrade/downgrade).
purchaseType integer The type of purchase. 0 = Test (sandbox), 1 = Promo.
orderId string The order ID of the latest recurring order.
acknowledgementState integer The acknowledgement state. 0 = Yet to be acknowledged, 1 = Acknowledged.
externalAccountId string User account identifier in the third-party service.
promotionType integer The type of promotion applied on this purchase. 0 = One-time code, 1 = Vanity code.
promotionCode string The promotion code applied on this purchase.
obfuscatedExternalAccountId string Obfuscated user account ID in the third-party service.
obfuscatedExternalProfileId string Obfuscated user profile ID in the third-party service.
View JSON Schema on GitHub

JSON Schema

android-subscriptionpurchase-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SubscriptionPurchase",
  "title": "SubscriptionPurchase",
  "type": "object",
  "description": "Represents a subscription purchase. Contains the subscription state, expiry time, auto-renewal status, and cancellation details.",
  "properties": {
    "kind": {
      "type": "string",
      "description": "Resource type identifier.",
      "const": "androidpublisher#subscriptionPurchase",
      "example": "example_value"
    },
    "startTimeMillis": {
      "type": "string",
      "format": "int64",
      "description": "Time at which the subscription was granted (milliseconds since Epoch).",
      "example": "example_value"
    },
    "expiryTimeMillis": {
      "type": "string",
      "format": "int64",
      "description": "Time at which the subscription will expire (milliseconds since Epoch). For cancelled subscriptions, this is when access ends.",
      "example": "example_value"
    },
    "userCancellationTimeMillis": {
      "type": "string",
      "format": "int64",
      "description": "Time at which the subscription was canceled by the user (milliseconds since Epoch). Only present if cancelReason is 0.",
      "example": "example_value"
    },
    "autoRenewing": {
      "type": "boolean",
      "description": "Whether the subscription will automatically be renewed.",
      "example": true
    },
    "priceCurrencyCode": {
      "type": "string",
      "description": "ISO 4217 currency code for the subscription price.",
      "example": "example_value"
    },
    "priceAmountMicros": {
      "type": "string",
      "format": "int64",
      "description": "Price of the subscription in micro-units of the currency. For example, 7990000 represents $7.99.",
      "example": "example_value"
    },
    "introductoryPriceInfo": {
      "$ref": "#/components/schemas/IntroductoryPriceInfo"
    },
    "countryCode": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country code of the user at the time the subscription was granted.",
      "example": "example_value"
    },
    "developerPayload": {
      "type": "string",
      "description": "Developer-specified string for additional information.",
      "deprecated": true,
      "example": "example_value"
    },
    "paymentState": {
      "type": "integer",
      "description": "The payment state of the subscription. 0 = Payment pending, 1 = Payment received, 2 = Free trial, 3 = Pending deferred upgrade/downgrade.",
      "enum": [
        0,
        1,
        2,
        3
      ],
      "example": 0
    },
    "cancelReason": {
      "type": "integer",
      "description": "The reason a subscription was cancelled or not auto-renewed. 0 = User cancelled, 1 = System cancelled (billing issue), 2 = Replaced with a new subscription, 3 = Developer cancelled.",
      "enum": [
        0,
        1,
        2,
        3
      ],
      "example": 0
    },
    "linkedPurchaseToken": {
      "type": "string",
      "description": "The purchase token of the previous subscription if this subscription is a replacement (upgrade/downgrade).",
      "example": "example_value"
    },
    "purchaseType": {
      "type": "integer",
      "description": "The type of purchase. 0 = Test (sandbox), 1 = Promo.",
      "enum": [
        0,
        1
      ],
      "example": 0
    },
    "orderId": {
      "type": "string",
      "description": "The order ID of the latest recurring order.",
      "example": "500123"
    },
    "acknowledgementState": {
      "type": "integer",
      "description": "The acknowledgement state. 0 = Yet to be acknowledged, 1 = Acknowledged.",
      "enum": [
        0,
        1
      ],
      "example": 0
    },
    "externalAccountId": {
      "type": "string",
      "description": "User account identifier in the third-party service.",
      "example": "500123"
    },
    "promotionType": {
      "type": "integer",
      "description": "The type of promotion applied on this purchase. 0 = One-time code, 1 = Vanity code.",
      "enum": [
        0,
        1
      ],
      "example": 0
    },
    "promotionCode": {
      "type": "string",
      "description": "The promotion code applied on this purchase.",
      "example": "example_value"
    },
    "obfuscatedExternalAccountId": {
      "type": "string",
      "description": "Obfuscated user account ID in the third-party service.",
      "example": "500123"
    },
    "obfuscatedExternalProfileId": {
      "type": "string",
      "description": "Obfuscated user profile ID in the third-party service.",
      "example": "500123"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/android-subscriptionpurchase"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.