- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- DeferralContext
- ItemExpiryTimeDetails
- Try it!
Defers the renewal of a subscription.
HTTP request
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:defer
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
packageName |
Required. The package of the application for which this subscription was purchased (for example, 'com.some.thing'). |
token |
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 |
|---|
{
"deferralContext": {
object ( |
| Fields | |
|---|---|
deferralContext |
Required. Details about the subscription deferral. |
Response body
Response for the v2 purchases.subscriptions.defer API.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"itemExpiryTimeDetails": [
{
object ( |
| Fields | |
|---|---|
itemExpiryTimeDetails[] |
The new expiry time for each subscription items. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/androidpublisher
DeferralContext
Deferral context of the purchases.subscriptionsv2.defer API.
| JSON representation |
|---|
{ "etag": string, "deferDuration": string, "validateOnly": boolean } |
| Fields | |
|---|---|
etag |
Required. 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 |
deferDuration |
Required. The duration by which all subscription items should be deferred. A duration in seconds with up to nine fractional digits, ending with ' |
validateOnly |
If set to "true", the request is a dry run to validate the effect of subscriptionsv2.defer, the subscription would not be impacted. |
ItemExpiryTimeDetails
Expiry time details of a subscription item.
| JSON representation |
|---|
{ "productId": string, "expiryTime": string } |
| Fields | |
|---|---|
productId |
The product ID of the subscription item (for example, 'premium_plan'). |
expiryTime |
The new expiry time for this subscription item. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |