Method: partners.subscriptions.extend
Stay organized with collections
Save and categorize content based on your preferences.
[Opt-in only] Most partners should be on auto-extend by default.
Extends a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts.
HTTP request
POST https://paymentsresellersubscription.googleapis.com/v1/{name=partners/*/subscriptions/*}:extend
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
Required. The name of the subscription resource to be extended. It will have the format of "partners/{partner_id}/subscriptions/{subscriptionId}".
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"requestId": string,
"extension": {
object (Extension )
}
} |
Fields |
requestId |
string
Required. Restricted to 36 ASCII characters. A random UUID is recommended. The idempotency key for the request. The ID generation logic is controlled by the partner. requestId should be the same as on retries of the same request. A different requestId must be used for a extension of a different cycle.
|
extension |
object (Extension )
Required. Specifies details of the extension. Currently, the duration of the extension must be exactly one billing cycle of the original subscription.
|
Response body
Response that contains the timestamps after the extension.
If successful, the response body contains data with the following structure:
JSON representation |
{
"cycleEndTime": string,
"renewalTime": string,
"freeTrialEndTime": string
} |
Fields |
cycleEndTime |
string (Timestamp format)
The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. Example, "cycleEndTime":"2019-08-31T17:28:54.564Z" Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .
|
renewalTime |
string (Timestamp format)
Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: "2019-08-31T17:28:54.564Z" Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .
|
freeTrialEndTime |
string (Timestamp format)
End of the free trial period, in ISO 8061 format. UTC timezone. Example, "freeTrialEndTime":"2019-08-31T17:28:54.564Z" This time will be set the same as initial subscription creation time if no free trial period is offered to the partner. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30" .
|
Extension
Describes the details of an extension request.
JSON representation |
{
"partnerUserToken": string,
"duration": {
object (Duration )
}
} |
Fields |
partnerUserToken |
string
Required. Identifier of the end-user in partner’s system.
|
duration |
object (Duration )
Required. Specifies the period of access the subscription should grant.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-12 UTC.
[null,null,["Last updated 2025-03-12 UTC."],[[["\u003cp\u003eExtends a subscription service for customers, ensuring it remains active and renewable.\u003c/p\u003e\n"],["\u003cp\u003eCalled directly by partners using service accounts with an HTTP POST request.\u003c/p\u003e\n"],["\u003cp\u003eRequires a request body containing the request ID and extension details, including partner user token and duration.\u003c/p\u003e\n"],["\u003cp\u003eReturns the updated cycle end time, renewal time, and free trial end time (if applicable) upon successful extension.\u003c/p\u003e\n"],["\u003cp\u003ePrimarily for partners not on auto-extend by default, allowing them to manage subscription lifecycles.\u003c/p\u003e\n"]]],["Partners extend subscriptions using a POST request to a specified URL with the subscription's name as a path parameter. The request body requires a `requestId` (a unique ID) and an `extension` object, detailing the extension's `partnerUserToken` and `duration`. The response includes `cycleEndTime`, `renewalTime`, and `freeTrialEndTime` timestamps, indicating the subscription's new extension and renewal time. The extension duration must match the original subscription's billing cycle, and the `partnerUserToken` is required for the extension request.\n"],null,["# Method: partners.subscriptions.extend\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ExtendSubscriptionResponse.SCHEMA_REPRESENTATION)\n- [Extension](#Extension)\n - [JSON representation](#Extension.SCHEMA_REPRESENTATION)\n\n\\[Opt-in only\\] Most partners should be on auto-extend by default.\n\nExtends a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts.\n\n### HTTP request\n\n`POST https://paymentsresellersubscription.googleapis.com/v1/{name=partners/*/subscriptions/*}:extend`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the subscription resource to be extended. It will have the format of \"partners/{partner_id}/subscriptions/{subscriptionId}\". |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestId\": string, \"extension\": { object (/payments/reseller/subscription/reference/rest/v1/partners.subscriptions/extend#Extension) } } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestId` | `string` Required. Restricted to 36 ASCII characters. A random UUID is recommended. The idempotency key for the request. The ID generation logic is controlled by the partner. requestId should be the same as on retries of the same request. A different requestId must be used for a extension of a different cycle. |\n| `extension` | `object (`[Extension](/payments/reseller/subscription/reference/rest/v1/partners.subscriptions/extend#Extension)`)` Required. Specifies details of the extension. Currently, the duration of the extension must be exactly one billing cycle of the original subscription. |\n\n### Response body\n\nResponse that contains the timestamps after the extension.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------|\n| ``` { \"cycleEndTime\": string, \"renewalTime\": string, \"freeTrialEndTime\": string } ``` |\n\n| Fields ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `cycleEndTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. Example, \"cycleEndTime\":\"2019-08-31T17:28:54.564Z\" Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| `renewalTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: \"2019-08-31T17:28:54.564Z\" Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n| `freeTrialEndTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` End of the free trial period, in ISO 8061 format. UTC timezone. Example, \"freeTrialEndTime\":\"2019-08-31T17:28:54.564Z\" This time will be set the same as initial subscription creation time if no free trial period is offered to the partner. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n\nExtension\n---------\n\nDescribes the details of an extension request.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"partnerUserToken\": string, \"duration\": { object (/payments/reseller/subscription/reference/rest/v1/Duration) } } ``` |\n\n| Fields ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `partnerUserToken` | `string` Required. Identifier of the end-user in partner's system. |\n| `duration` | `object (`[Duration](/payments/reseller/subscription/reference/rest/v1/Duration)`)` Required. Specifies the period of access the subscription should grant. |"]]