The latestOrderId field in SubscriptionPurchaseV2 is deprecated. The following is the JSON representation of the SubscriptionPurchaseV2 object.

JSON representation
{
  "kind": string,
  "regionCode": string,
  "lineItems": [
    {
      object (SubscriptionPurchaseLineItem)
    }
  ],
  "startTime": string,
  "subscriptionState": enum (SubscriptionState),
  "latestOrderId": string, Deprecated. Use lineItems.latest_successful_order_id instead.
  "linkedPurchaseToken": string,
  "pausedStateContext": {
    object (PausedStateContext)
  },
  "canceledStateContext": {
    object (CanceledStateContext)
  },
  "testPurchase": {
    object (TestPurchase)
  },
  "acknowledgementState": enum (AcknowledgementState),
  "externalAccountIdentifiers": {
    object (ExternalAccountIdentifiers)
  },
  "subscribeWithGoogleInfo": {
    object (SubscribeWithGoogleInfo)
  },
  "etag": string,
  "outOfAppPurchaseContext": {
    object (OutOfAppPurchaseContext)
  }
}
Fields
kind

string

This kind represents a SubscriptionPurchaseV2 object in the androidpublisher service.

regionCode

string

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

lineItems[]

object (SubscriptionPurchaseLineItem)

Item-level info for a subscription purchase. The items in the same purchase should be either all with AutoRenewingPlan or all with PrepaidPlan.

startTime

string (Timestamp format)

Time at which the subscription was granted. Not set for pending subscriptions (subscription was created but awaiting payment during signup).

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

subscriptionState

enum (SubscriptionState)

The current state of the subscription.

latestOrderId
(deprecated)

string

Deprecated: Use lineItems.latest_successful_order_id instead. The order id of the latest order associated with the purchase of the subscription. For autoRenewing subscription, this is the order id of signup order if it is not renewed yet, or the last recurring order id (success, pending, or declined order). For prepaid subscription, this is the order id associated with the queried purchase token.

linkedPurchaseToken

string

The purchase token of the old subscription if this subscription is one of the following: * Re-signup of a canceled but non-lapsed subscription * Upgrade/downgrade from a previous subscription. * Convert from prepaid to auto renewing subscription. * Convert from an auto renewing subscription to prepaid. * Topup a prepaid subscription.

pausedStateContext

object (PausedStateContext)

Additional context around paused subscriptions. Only present if the subscription currently has subscriptionState SUBSCRIPTION_STATE_PAUSED.

canceledStateContext

object (CanceledStateContext)

Additional context around canceled subscriptions. Only present if the subscription currently has subscriptionState SUBSCRIPTION_STATE_CANCELED or SUBSCRIPTION_STATE_EXPIRED.

testPurchase

object (TestPurchase)

Only present if this subscription purchase is a test purchase.

acknowledgementState

enum (AcknowledgementState)

The acknowledgement state of the subscription.

externalAccountIdentifiers

object (ExternalAccountIdentifiers)

User account identifier in the third-party service.

subscribeWithGoogleInfo

object (SubscribeWithGoogleInfo)

User profile associated with purchases made with 'Subscribe with Google'.

etag

string

Entity tag representing the current state of the subscription. The developer will provide this etag for subscription actions. This etag is always present for auto-renewing and prepaid subscriptions.

outOfAppPurchaseContext

object (OutOfAppPurchaseContext)

Additional context for out of app purchases. This information is only present for re-subscription purchases (subscription purchases made after the previous subscription of the same product has expired) made through the Google Play subscriptions center. This field will be removed after you acknowledge the subscription.