Method: partners.subscriptions.cancel

Used by partners to cancel a subscription service either immediately or by the end of the current billing cycle 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/*}:cancel

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the subscription resource to be cancelled. It will have the format of "partners/{partner_id}/subscriptions/{subscriptionId}"

Request body

The request body contains data with the following structure:

JSON representation
{
  "cancellationReason": enum (CancellationReason),
  "cancelImmediately": boolean
}
Fields
cancellationReason

enum (CancellationReason)

Specifies the reason for the cancellation.

cancelImmediately

boolean

Optional. If true, Google will cancel the subscription immediately, and may or may not (based on the contract) issue a prorated refund for the remainder of the billing cycle. Otherwise, Google defers the cancelation at renewalTime, and will not issue a refund.

Response body

Response that contains the cancelled subscription resource.

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

JSON representation
{
  "subscription": {
    object (Subscription)
  }
}
Fields
subscription

object (Subscription)

The cancelled subscription resource.