---
title: "Terminate commitment"
method: POST
path: "/commitments/{id}/terminate"
tags: ["Commitments"]
---

# Terminate commitment

`POST /commitments/{id}/terminate`

## Request

- Base URL: `https://us.api.flexprice.io/v1`
- URL: `https://us.api.flexprice.io/v1/commitments/{id}/terminate`
- Auth: API key in header `x-api-key`

Ends a commitment early, effective at the given time or now.

## Path parameters

- `id` string, required

## Request body

- TerminateCommitmentRequest
  - `cancellation_fee` string
  - `effective_at` string, date-time

## Response `200`

OK

- CommitmentResponse
  - `active_windows` TypesActiveWindow[]
    - `end` TypesBucket
      - `hour` integer
      - `minute` integer
    - `start` TypesBucket
      - `hour` integer
      - `minute` integer
  - `binding` boolean
  - `collection_method` 'per_period' | 'billing_terms'
  - `commitment_status` 'active' | 'ended' | 'terminated'
  - `commitment_value` string
  - `committed_price_id` string
  - `created_at` string, date-time
  - `created_by` string
  - `currency` string
  - `customer_id` string
  - `end_date` string, date-time: EndDate is exclusive; nil for an open-ended commitment, which runs until terminated.
  - `environment_id` string
  - `id` string
  - `idempotency_key` string
  - `instalment_invoicing` string
  - `invoice_description` string
  - `invoice_label` string
  - `measurement` 'billing_period' | 'window'
  - `metadata` TypesMetadata
  - `name` string
  - `on_early_termination` 'forfeit' | 'credit_note' | 'bill_remaining'
  - `overage_price_id` string
  - `priority` integer
  - `scope_entity_id` string
  - `scope_entity_type` 'subscription' | 'group' | 'meter' | 'price'
  - `start_date` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `subscription_id` string
  - `tenant_id` string
  - `terminated_at` string, date-time
  - `termination_invoice_id` string
  - `timezone` string
  - `total_amount` string
  - `type` 'amount' | 'quantity'
  - `updated_at` string, date-time
  - `updated_by` string
  - `value` string

## Other responses

- `400`: Invalid request
- `404`: Resource not found
- `500`: Server error

## Changes

- **2026-10-25** `3d4c411111a7`: 1 breaking, 3 warning
  - the `cancellation_fee` request property type changed from `object` to `string`
  - removed the request property `bill_remaining`
  - removed the request property `cancellation_fee/type`
  - removed the request property `cancellation_fee/value`
- **2026-10-25** `4746c65d9396`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/commitments/:id/terminate/post.md)

---

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