Method: purchases.subscriptions.defer

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

HTTP request

POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:defer

The URL uses gRPC Transcoding syntax.

Path parameters

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.

Request body

The request body contains data with the following structure:

JSON representation
{
  "deferralInfo": {
    object (SubscriptionDeferralInfo)
  }
}
Fields
deferralInfo

object (SubscriptionDeferralInfo)

The information about the new desired expiry time for the subscription.

Response body

Response for the purchases.subscriptions.defer API.

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

JSON representation
{
  "newExpiryTimeMillis": string
}
Fields
newExpiryTimeMillis

string (int64 format)

The new expiry time for the subscription in milliseconds since the Epoch.

Authorization scopes

Requires the following OAuth scope:

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

SubscriptionDeferralInfo

A SubscriptionDeferralInfo contains the data needed to defer a subscription purchase to a future expiry time.

JSON representation
{
  "expectedExpiryTimeMillis": string,
  "desiredExpiryTimeMillis": string
}
Fields
expectedExpiryTimeMillis

string (int64 format)

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.

desiredExpiryTimeMillis

string (int64 format)

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.