cancel_subscription
Queue a subscription cancellation. Provider-side cancellation and local state mutation run asynchronously on the webhooks queue.
Purpose
Cancel a subscription. Delegates to an Action which queues a job — provider-side cancellation (Stripe / PayPal / Razorpay / Paystack), local state mutation, and the subscription.cancelled event all fire on the webhooks queue. Already-cancelled subscriptions return SUBSCRIPTION_ALREADY_ACTIVE instead of silently succeeding.
Required ability
project-subscription:update
Input schema
{
"type": "object",
"required": ["subscription_id"],
"properties": {
"subscription_id": {
"type": "string",
"description": "UUID of the subscription to cancel."
}
}
}Output shape
{
"data": {
"subscription_id": "sub_01HX...",
"status": "cancellation_queued"
}
}Example prompts
"Cancel subscription
sub_01HX...."
"Stop billing on Jane's Premium subscription."
Failure modes
RESOURCE_NOT_FOUND— unknownsubscription_id, or the subscription belongs to a team outside the token's scope.SUBSCRIPTION_ALREADY_ACTIVE— subscription already cancelled.TOKEN_MISSING_ABILITY— token lacksproject-subscription:update.
Related
How is this guide?