Method: partners.subscriptions.extend

Used by partners to extend a subscription service for their customers. 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. A random UUID is recommended.

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

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

JSON representation
{
  "cycleEndTime": 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"

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

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)

Specifies the period of access the subscription should grant.