---
title: "Cancel your subscription at the end of the current period"
method: POST
path: "/api/account/subscription/cancel"
---

# Cancel your subscription at the end of the current period

`POST /api/account/subscription/cancel`

## Request

- Base URL: `https://api.peelaway.io`
- URL: `https://api.peelaway.io/api/account/subscription/cancel`
- Auth: API key in cookie `better-auth.session_token`

Session-only account operation. Send no body or an empty JSON object; account identity and cancellation timing cannot be overridden. Repeated calls are safe. Stripe webhooks update billing state and queue the existing confirmation email. Store subscriptions must be canceled through Apple or Google. API keys and MCP OAuth are not accepted.

## Response `200`

Cancellation scheduled or subscription already ended

- object
  - `provider` 'stripe', required
  - `status` 'cancellation_scheduled' | 'already_ended', required
  - `endsAt` string, date-time, nullable, required

## Other responses

- `400`: Body must be empty or an empty JSON object
- `401`: Authentication required
- `403`: Session required or invalid browser origin
- `409`: No subscription, ownership mismatch, or store-managed subscription (provider and managementUrl returned)
- `415`: JSON content type required for session requests without Origin
- `502`: Cancellation could not be confirmed; safe to retry

---

[API](https://skmtc.dev/peelaway/apis/peelaway-image-api.md) · [All operations](https://skmtc.dev/peelaway/apis/peelaway-image-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peelaway/apis/peelaway-image-api/revisions/8ce45533c9d0?raw)
