Method: purchases.subscriptionsv2.scheduleplantransition

Schedule a plan transition for a subscription.

HTTP request

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:schedulePlanTransition

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
packageName

string

Required. The package of the application for which this subscription was purchased (for example, 'com.some.thing').

token

string

Required. The token provided to the user's device when the subscription was purchased.

Request body

The request body contains data with the following structure:

JSON representation
{
  "productId": string,
  "earliestTransitionEffectiveTime": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "definiteTransition": {
    object (DefiniteTransition)
  },
  "tentativeTransition": {
    object (TentativeTransition)
  }
  // End of mutually exclusive fields.
  "etag": string
}
Fields
productId

string

Required. The subscription product (for example, 'premium_plan') for which the transition must be scheduled.

earliestTransitionEffectiveTime

string (Timestamp format)

Required. The earliest time at which the plan transition may take effect. The actual transition will take place at the time of renewal on or after this time.

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

[Required] The mode for the plan transition. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
definiteTransition

object (DefiniteTransition)

When using this mode, the user's transition to the new plan is definite, and cannot be canceled.

tentativeTransition

object (TentativeTransition)

When using this mode, the user's transition to the new plan is tentative, and can be canceled.

End of mutually exclusive fields.
etag

string

If set, the API will fail if the etag does not match the latest etag for this subscription. The etag is retrieved from purchases.subscriptionsv2.get: https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/get

Response body

Response for the purchases.subscriptionsv2.schedulePlanTransition API.

If successful, the response body contains data with the following structure:

JSON representation
{
  "planTransitionDetails": {
    object (PlanTransitionDetails)
  }
}
Fields
planTransitionDetails

object (PlanTransitionDetails)

The plan transition details of the subscription item.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/androidpublisher

DefiniteTransition

This type has no fields.

Used to indicate that the plan transition is definite.

TentativeTransition

This type has no fields.

Used to indicate that the plan transition is tentative.