- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- DefiniteTransition
- TentativeTransition
- Try it!
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 |
Required. The package of the application for which this subscription was purchased (for example, 'com.some.thing'). |
token |
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 ( |
| Fields | |
|---|---|
productId |
Required. The subscription product (for example, 'premium_plan') for which the transition must be scheduled. |
earliestTransitionEffectiveTime |
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: |
| [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 |
When using this mode, the user's transition to the new plan is definite, and cannot be canceled. |
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 |
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 ( |
| Fields | |
|---|---|
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.