---
title: "Cancel the user's active Stripe subscription"
method: POST
path: "/api/stripe/cancel"
tags: ["Stripe"]
---

# Cancel the user's active Stripe subscription

`POST /api/stripe/cancel`

## Request

- Base URL: `https://api.hiyd.ai`
- URL: `https://api.hiyd.ai/api/stripe/cancel`
- Auth: HTTP bearer

## Request body

- object
  - `immediately` boolean: If true cancel now; otherwise cancel at period end

## Response `200`

Subscription cancellation initiated

## Other responses

- `400`: No active Stripe subscription
- `401`: Unauthorized

---

[API](https://skmtc.dev/hiyd/apis/hiyd-backend-api.md) - [All operations](https://skmtc.dev/hiyd/apis/hiyd-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hiyd/apis/hiyd-backend-api/revisions/23598d347e1b?raw)
