Early bird discounts live! Claim your offer
MemberPass Logo

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 — unknown subscription_id, or the subscription belongs to a team outside the token's scope.
  • SUBSCRIPTION_ALREADY_ACTIVE — subscription already cancelled.
  • TOKEN_MISSING_ABILITY — token lacks project-subscription:update.

How is this guide?

On this page

MemberPass is a product designed by you — for you.

No boardroom full of executives deciding what we ships next. Our roadmap always shaped by you with your feedback.

Share feedback or a request