CancelSubscription cancels the organization's subscription.
POST/api/v1/billing/subscription/cancel
Initiates cancellation either immediately or at the end of the current billing period. Cancelled subscriptions retain read-only access until the effective cancellation date.
Authorization
Requires billing:manage permission.
Behavior
- at_period_end=true: Service continues until current_period_end, then cancelled
- at_period_end=false: Service suspended immediately, prorated credit may apply
- Sets cancelled_at timestamp
- Optionally records cancellation reason for analytics
Response
Returns updated Subscription with cancellation details.
Errors
- NOT_FOUND: No active subscription exists
- FAILED_PRECONDITION: Subscription already cancelled
- PERMISSION_DENIED: Caller lacks billing:manage permission
Request
Responses
- 200
- default
A successful response.
An unexpected error response.