Method: partners.subscriptions.cancel

Used by partners to cancel a subscription service 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, the subscription will be cancelled immediately. Otherwise, the subscription will be cancelled at the end of the current cycle, and therefore no prorated refund will be issued for the rest of the cycle.

Response body

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

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

object (Subscription)

The cancelled subscription resource.