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 |
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 ( |
Fields | |
---|---|
cancellationReason |
Specifies the reason for the cancellation. |
cancelImmediately |
Optional. If true, the subscription will be cancelled immediately. Otherwise, the subscription will be cancelled at renewalTime, 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 ( |
Fields | |
---|---|
subscription |
The cancelled subscription resource. |