Android · Schema

SubscriptionPurchase

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

AIAndroidAutomotiveGoogleMachine 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.
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