cancel_subscription
DestructiveIdempotent
Cancel the authenticated user's posterly subscription. DESTRUCTIVE billing action; requires the billing:write scope. ALWAYS ask the user why they are cancelling FIRST and pass their answer as reason (one of the allowed values). By default an active or trialing plan is set to cancel at the end of the current period. A past_due or unpaid plan always ends now, even when immediate is false: the unpaid renewal is dropped and payment retries stop. Pass immediate=true only when the user explicitly wants an active plan cancelled right now. Only call after the user explicitly confirms.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Why the user is cancelling. Ask the user before calling; do not guess. | |
| confirm | Yes | Must be true after the user explicitly confirms the cancellation. | |
| feedback | No | Optional free-text detail the user gave about why they are cancelling. | |
| immediate | No | Cancel immediately instead of at period end. Defaults to false. Ignored for past_due and unpaid plans, which always end now. |