- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- SubscriptionDeferralInfo
- Try it!
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 | |
---|---|
package |
The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). |
subscription |
The purchased subscription ID (for example, 'monthly001'). |
token |
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 ( |
Fields | |
---|---|
deferral |
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 | |
---|---|
new |
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 | |
---|---|
expected |
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. |
desired |
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. |