Purchases.subscriptions: defer

Requires authorization

Defers a user's subscription purchase until a specified future expiration time.

Request

HTTP request

POST https://www.googleapis.com/androidpublisher/v2/applications/packageName/purchases/subscriptions/subscriptionId/tokens/token:defer

Parameters

Parameter name Value Description
Path parameters
packageName string The package name of the application for which this subscription was purchased (for example, 'com.some.thing').
subscriptionId string The purchased subscription ID (for example, 'monthly001').
token string The token provided to the user's device when the subscription was purchased.

Authorization

This request requires authorization with the following scope (read more about authentication and authorization).

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

Request body

In the request body, supply data with the following structure:

{
  "deferralInfo": {
    "expectedExpiryTimeMillis": long,
    "desiredExpiryTimeMillis": long
  }
}
Property name Value Description Notes
deferralInfo nested object The information about the new desired expiry time for the subscription.
deferralInfo.expectedExpiryTimeMillis long The expected expiry time for the subscription. If the current expiry time for the subscription is not the value specified here, the deferral will not occur.
deferralInfo.desiredExpiryTimeMillis long The desired next expiry time to assign to the subscription, in milliseconds since the Epoch. The given time must be later/greater than the current expiry time for the subscription.

Response

If successful, this method returns a response body with the following structure:

{
  "newExpiryTimeMillis": long
}
Property name Value Description Notes
newExpiryTimeMillis long The new expiry time for the subscription in milliseconds since the Epoch.