- [HTTP request](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#body.request_body)
  - [JSON representation](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#body.response_body)
- [Authorization scopes](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#body.aspect)
- [Try it!](https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptionsv2/cancelplantransition.md.txt#try-it)

subscriptionsv2.cancel a plan transition for a subscription.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) 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, "etag": string } ``` |

| Fields ||
|---|---|
| `productId` | `string` Required. The subscription product (for example, 'premium_plan') for which an in process plan transition should be canceled. |
| `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

If successful, the response body is empty.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/androidpublisher`