Show / Hide Table of Contents

Class SubscriptionPurchase

A SubscriptionPurchase resource indicates the status of a user's subscription purchase.

Inheritance
object
SubscriptionPurchase
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.AndroidPublisher.v3.Data
Assembly: Google.Apis.AndroidPublisher.v3.dll
Syntax
public class SubscriptionPurchase : IDirectResponseSchema

Properties

AcknowledgementState

The acknowledgement state of the subscription product. Possible values are: 0. Yet to be acknowledged 1. Acknowledged

Declaration
[JsonProperty("acknowledgementState")]
public virtual int? AcknowledgementState { get; set; }
Property Value
Type Description
int?

AutoRenewing

Whether the subscription will automatically be renewed when it reaches its current expiry time.

Declaration
[JsonProperty("autoRenewing")]
public virtual bool? AutoRenewing { get; set; }
Property Value
Type Description
bool?

AutoResumeTimeMillis

Time at which the subscription will be automatically resumed, in milliseconds since the Epoch. Only present if the user has requested to pause the subscription.

Declaration
[JsonProperty("autoResumeTimeMillis")]
public virtual long? AutoResumeTimeMillis { get; set; }
Property Value
Type Description
long?

CancelReason

The reason why a subscription was canceled or is not auto-renewing. Possible values are: 0. User canceled the subscription 1. Subscription was canceled by the system, for example because of a billing problem 2. Subscription was replaced with a new subscription 3. Subscription was canceled by the developer

Declaration
[JsonProperty("cancelReason")]
public virtual int? CancelReason { get; set; }
Property Value
Type Description
int?

CancelSurveyResult

Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey).

Declaration
[JsonProperty("cancelSurveyResult")]
public virtual SubscriptionCancelSurveyResult CancelSurveyResult { get; set; }
Property Value
Type Description
SubscriptionCancelSurveyResult

CountryCode

ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted.

Declaration
[JsonProperty("countryCode")]
public virtual string CountryCode { get; set; }
Property Value
Type Description
string

DeveloperPayload

A developer-specified string that contains supplemental information about an order.

Declaration
[JsonProperty("developerPayload")]
public virtual string DeveloperPayload { get; set; }
Property Value
Type Description
string

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

EmailAddress

The email address of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Declaration
[JsonProperty("emailAddress")]
public virtual string EmailAddress { get; set; }
Property Value
Type Description
string

ExpiryTimeMillis

Time at which the subscription will expire, in milliseconds since the Epoch.

Declaration
[JsonProperty("expiryTimeMillis")]
public virtual long? ExpiryTimeMillis { get; set; }
Property Value
Type Description
long?

ExternalAccountId

User account identifier in the third-party service. Only present if account linking happened as part of the subscription purchase flow.

Declaration
[JsonProperty("externalAccountId")]
public virtual string ExternalAccountId { get; set; }
Property Value
Type Description
string

FamilyName

The family name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Declaration
[JsonProperty("familyName")]
public virtual string FamilyName { get; set; }
Property Value
Type Description
string

GivenName

The given name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Declaration
[JsonProperty("givenName")]
public virtual string GivenName { get; set; }
Property Value
Type Description
string

IntroductoryPriceInfo

Introductory price information of the subscription. This is only present when the subscription was purchased with an introductory price. This field does not indicate the subscription is currently in introductory price period.

Declaration
[JsonProperty("introductoryPriceInfo")]
public virtual IntroductoryPriceInfo IntroductoryPriceInfo { get; set; }
Property Value
Type Description
IntroductoryPriceInfo

Kind

This kind represents a subscriptionPurchase object in the androidpublisher service.

Declaration
[JsonProperty("kind")]
public virtual string Kind { get; set; }
Property Value
Type Description
string

LinkedPurchaseToken

The purchase token of the originating purchase if this subscription is one of the following: 0. Re-signup of a canceled but non-lapsed subscription 1. Upgrade/downgrade from a previous subscription For example, suppose a user originally signs up and you receive purchase token X, then the user cancels and goes through the resignup flow (before their subscription lapses) and you receive purchase token Y, and finally the user upgrades their subscription and you receive purchase token Z. If you call this API with purchase token Z, this field will be set to Y. If you call this API with purchase token Y, this field will be set to X. If you call this API with purchase token X, this field will not be set.

Declaration
[JsonProperty("linkedPurchaseToken")]
public virtual string LinkedPurchaseToken { get; set; }
Property Value
Type Description
string

ObfuscatedExternalAccountId

An obfuscated version of the id that is uniquely associated with the user's account in your app. Present for the following purchases: * If account linking happened as part of the subscription purchase flow. * It was specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made.

Declaration
[JsonProperty("obfuscatedExternalAccountId")]
public virtual string ObfuscatedExternalAccountId { get; set; }
Property Value
Type Description
string

ObfuscatedExternalProfileId

An obfuscated version of the id that is uniquely associated with the user's profile in your app. Only present if specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid when the purchase was made.

Declaration
[JsonProperty("obfuscatedExternalProfileId")]
public virtual string ObfuscatedExternalProfileId { get; set; }
Property Value
Type Description
string

OrderId

The order id of the latest recurring order associated with the purchase of the subscription. If the subscription was canceled because payment was declined, this will be the order id from the payment declined order.

Declaration
[JsonProperty("orderId")]
public virtual string OrderId { get; set; }
Property Value
Type Description
string

PaymentState

The payment state of the subscription. Possible values are: 0. Payment pending 1. Payment received 2. Free trial 3. Pending deferred upgrade/downgrade Not present for canceled, expired subscriptions.

Declaration
[JsonProperty("paymentState")]
public virtual int? PaymentState { get; set; }
Property Value
Type Description
int?

PriceAmountMicros

Price of the subscription, For tax exclusive countries, the price doesn't include tax. For tax inclusive countries, the price includes tax. Price is expressed in micro-units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000.

Declaration
[JsonProperty("priceAmountMicros")]
public virtual long? PriceAmountMicros { get; set; }
Property Value
Type Description
long?

PriceChange

The latest price change information available. This is present only when there is an upcoming price change for the subscription yet to be applied. Once the subscription renews with the new price or the subscription is canceled, no price change information will be returned.

Declaration
[JsonProperty("priceChange")]
public virtual SubscriptionPriceChange PriceChange { get; set; }
Property Value
Type Description
SubscriptionPriceChange

PriceCurrencyCode

ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP".

Declaration
[JsonProperty("priceCurrencyCode")]
public virtual string PriceCurrencyCode { get; set; }
Property Value
Type Description
string

ProfileId

The Google profile id of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Declaration
[JsonProperty("profileId")]
public virtual string ProfileId { get; set; }
Property Value
Type Description
string

ProfileName

The profile name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'.

Declaration
[JsonProperty("profileName")]
public virtual string ProfileName { get; set; }
Property Value
Type Description
string

PromotionCode

The promotion code applied on this purchase. This field is only set if a vanity code promotion is applied when the subscription was purchased.

Declaration
[JsonProperty("promotionCode")]
public virtual string PromotionCode { get; set; }
Property Value
Type Description
string

PromotionType

The type of promotion applied on this purchase. This field is only set if a promotion is applied when the subscription was purchased. Possible values are: 0. One time code 1. Vanity code

Declaration
[JsonProperty("promotionType")]
public virtual int? PromotionType { get; set; }
Property Value
Type Description
int?

PurchaseType

The type of purchase of the subscription. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0. Test (i.e. purchased from a license testing account)

  1. Promo (i.e. purchased using a promo code)
Declaration
[JsonProperty("purchaseType")]
public virtual int? PurchaseType { get; set; }
Property Value
Type Description
int?

StartTimeMillis

Time at which the subscription was granted, in milliseconds since the Epoch.

Declaration
[JsonProperty("startTimeMillis")]
public virtual long? StartTimeMillis { get; set; }
Property Value
Type Description
long?

UserCancellationTimeMillis

The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0.

Declaration
[JsonProperty("userCancellationTimeMillis")]
public virtual long? UserCancellationTimeMillis { get; set; }
Property Value
Type Description
long?

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX