v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-13145259.5 KB
partners

Cancels 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.

post/v1/{+name}:cancel

Path parameters

namestring required

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

Request body

cancellationReason'CANCELLATION_REASON_UNSPECIFIED' | 'CANCELLATION_REASON_FRAUD' | 'CANCELLATION_REASON_REMORSE' | 'CANCELLATION_REASON_ACCIDENTAL_PURCHASE' | 'CANCELLATION_REASON_PAST_DUE' | 'CANCELLATION_REASON_ACCOUNT_CLOSED' | 'CANCELLATION_REASON_UPGRADE_DOWNGRADE' | 'CANCELLATION_REASON_USER_DELINQUENCY' | 'CANCELLATION_REASON_SYSTEM_ERROR' | 'CANCELLATION_REASON_SYSTEM_CANCEL' | 'CANCELLATION_REASON_BILLING_SYSTEM_SWITCH' | 'CANCELLATION_REASON_OTHER'

Specifies the reason for the cancellation.

cancelImmediatelyboolean

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 cancellation at renewal_time, and will not issue a refund. - YouTube subscriptions must use this option currently. However, the user will still have access to the subscription until the end of the billing cycle.

Response

Successful response