ArchivePlan soft-deletes a subscription plan.
DELETE/api/v1/billing/plans/:id
Archives a plan, making it unavailable for new subscriptions while preserving it for existing subscribers. Archived plans can be restored by updating is_active back to true.
Authorization
Requires billing:admin permission.
Behavior
- Plan is marked as inactive (is_active = false)
- Existing subscriptions on this plan continue unchanged
- Plan no longer appears in ListPlans (unless active_only = false)
- Plan data is preserved for historical reference
Response
Returns empty response on success.
Errors
- NOT_FOUND: Plan with specified ID does not exist
- PERMISSION_DENIED: Caller lacks billing:admin permission
- FAILED_PRECONDITION: Plan has active subscriptions (optional business rule)
Request
Responses
- 200
- default
A successful response.
An unexpected error response.