---
title: "POST /api/subscriptions/cancel/"
method: POST
path: "/api/subscriptions/cancel/"
tags: ["api"]
deprecated: true
---

# POST /api/subscriptions/cancel/

`POST /api/subscriptions/cancel/`

> **Deprecated.**

## Query parameters

- `customer_id` string, nullable, required
- `plan_id` string, uuid
- `subscription_filters` SubscriptionFilterRequest[]
  - `value` string, required
  - `property_name` string, required — The string name of the property to filter on. Example: 'product_id'

## Request body

- SubscriptionRecordCancelRequest
  - `flat_fee_behavior` 'refund' | 'charge_prorated' | 'charge_full' | 'null', nullable — When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of the subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged. * `refund` - Refund * `charge_prorated` - Prorate * `charge_full` - Charge Full
  - `usage_behavior` 'bill_full' | 'bill_none' — If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full. * `bill_full` - Bill Full * `bill_none` - Bill None
  - `invoicing_behavior` 'add_to_next_invoice' | 'invoice_now' — Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now. * `add_to_next_invoice` - Add to Next Invoice * `invoice_now` - Invoice Now

## Response `200`

- SubscriptionRecord[]
  - `subscription_id` string, required
  - `start_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
  - `end_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
  - `auto_renew` boolean, required — Whether the subscription automatically renews. Defaults to true.
  - `is_new` boolean, required — Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.
  - `subscription_filters` SubscriptionFilter[], required
    - `value` string, required
    - `property_name` string, required — The string name of the property to filter on. Example: 'product_id'
  - `customer` LightweightCustomer, required
    - `customer_name` string, nullable, required — The display name of the customer
    - `email` string, email, nullable, required — The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider
    - `customer_id` string, nullable, required — The id provided when creating the customer, we suggest matching with your internal customer id in your backend
  - `billing_plan` LightweightPlanVersion, required
    - `plan_name` string, required
    - `plan_id` string, required
    - `version_id` string, required
    - `version` union, required
      - integer
      - 'custom_version'
  - `fully_billed` boolean, required
  - `addons` LightweightAddOnSubscriptionRecord[], required
    - `addon_subscription_id` string, required
    - `start_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
    - `end_date` string, date-time, required — The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.
    - `addon` LightweightAddOn, required
      - `addon_name` string, required — The name of the add-on plan.
      - `addon_id` string, required — The ID of the add-on plan.
      - `addon_type` 'flat' | 'usage_based', required
      - `billing_frequency` 'one_time' | 'recurring', required — * `one_time` - one_time * `recurring` - recurring
    - `fully_billed` boolean, required
  - `metadata` object, required

## Changes

> 50 revisions in range; 1 could not be searched.

- **2023-03-15** `53167871bf12` — 1 breaking, 9 info
  - response property `items/billing_plan/version` list-of-types was widened by adding types `string` to media type `application/json` of response `200`
  - endpoint deprecated
  - added the required property `items/addons/items/addon_subscription_id` to the response with the `200` status
  - added the required property `items/metadata` to the response with the `200` status
  - …6 more
- **2023-02-20** `d246ebbb528d` — 1 breaking
  - the response property `items/customer/customer_id` became nullable for the status `200`
- **2023-02-19** `33a8ac13f9bf` — 1 info
  - the `items/customer/customer_id` response's property pattern `^[-a-zA-Z0-9_]+$` was removed for the status `200`
- **2023-02-17** `ecc2be015e66` — 1 breaking
  - the `items/addons/items/addon/addon_id` response's property type/format changed from `string`/`uuid` to `string`/`` for status `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/uselotus/apis/lotus-api/changes/api/subscriptions/cancel/post.md)

---

[API](https://skmtc.dev/uselotus/apis/lotus-api.md) · [All operations](https://skmtc.dev/uselotus/apis/lotus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uselotus/lotus-api/revisions/1f59f4fea13f/schema)
