[Opt-in only] Most partners should be on auto-extend by default. Used by partners to extend 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 |
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 ( |
Fields | |
---|---|
requestId |
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 |
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 |
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" A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
renewalTime |
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" A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
freeTrialEndTime |
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. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Extension
Describes the details of an extension request.
JSON representation |
---|
{
"partnerUserToken": string,
"duration": {
object ( |
Fields | |
---|---|
partnerUserToken |
Required. Identifier of the end-user in partner’s system. |
duration |
Required. Specifies the period of access the subscription should grant. |