Method: purchases.subscriptionsv2.revoke

subscriptionsv2.revoke a subscription purchase for the user.

HTTP request

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

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
{
  "revocationContext": {
    object (RevocationContext)
  }
}
Fields
revocationContext

object (RevocationContext)

Required. Additional details around the subscription revocation.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

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

RevocationContext

Revocation context of the purchases.subscriptionsv2.revoke API.

JSON representation
{

  // Union field RefundType can be only one of the following:
  "fullRefund": {
    object (FullRefund)
  },
  "proratedRefund": {
    object (ProratedRefund)
  }
  // End of list of possible types for union field RefundType.
}
Fields
Union field RefundType. Determines the type of refund that should be granted. A refund type must be specified as part of a valid request. RefundType can be only one of the following:
fullRefund

object (FullRefund)

Optional. Used when users should be refunded the full amount of the latest order of the subscription.

proratedRefund

object (ProratedRefund)

Optional. Used when users should be refunded a prorated amount they paid for their subscription based on the amount of time remaining in a subscription.

FullRefund

This type has no fields.

Used to determine if the refund type in the RevocationContext is a full refund.

ProratedRefund

This type has no fields.

Used to determine if the refund type in the RevocationContext is a prorated refund.