---
title: "What cancelling the plan would do"
method: GET
path: "/billing/subscription/cancel-preview"
tags: ["Billing"]
---

# What cancelling the plan would do

`GET /billing/subscription/cancel-preview`

## Request

- Base URL: `https://api.nippy.host`
- URL: `https://api.nippy.host/billing/subscription/cancel-preview`
- Auth: `bearer` (a scheme the document does not define)

Computed from live state for the confirm dialog: whether the plan ends immediately (a free trial) or at period end, which sites go offline, and how many members lose access.

## Response `200`

- APICancelPreview
  - `immediate` boolean, required: True when cancelling ends the plan at once (a free trial). False when it is scheduled for the end of the paid period.
  - `endsAt` string, date-time, nullable, required: When the plan ends if cancelled: the period end for a paid subscription; null when immediate.
  - `trialEndsAt` string, date-time, nullable, required: When the free trial would otherwise have run to — set only when `immediate`, so the dialog can say "now, not on <date>".
  - `sitesGoingOffline` string[], required: Hostnames of the live sites that go offline when the plan ends — the newest first, exactly the ones enforcement would suspend. They return if the account subscribes again.
  - `membersLosingAccess` number, required: Members (other than the owner) who lose access when the plan ends. Non-zero only on a Team plan.

## Other responses

- `400`: No active paid subscription
- `403`: Only the account owner can manage billing

---

[API](https://skmtc.dev/nippy/apis/nippy-backend-api.md) · [All operations](https://skmtc.dev/nippy/apis/nippy-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nippy/apis/nippy-backend-api/revisions/7ab23f040a55?raw)
