---
title: "Change subscription"
method: POST
path: "/openmeter/subscriptions/{subscriptionId}/change"
tags: ["OpenMeter Subscriptions"]
---

# Change subscription

`POST /openmeter/subscriptions/{subscriptionId}/change`

Closes a running subscription and starts a new one according to the
specification. Can be used for upgrades, downgrades, and plan changes.

## Path parameters

- `subscriptionId` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).

## Request body

- BillingSubscriptionChange — Request for changing a subscription.
  - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `settlement_mode` 'credit_then_invoice' | 'credit_only' — Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits.
  - `customer` object, required — The customer to create the subscription for.
    - `id` string — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `key` string — ExternalResourceKey is a unique string that is used to identify a resource in an external system.
  - `plan` object, required — The plan reference of the subscription.
    - `id` string — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `key` string — A key is a unique string that is used to identify a resource.
    - `version` integer — The plan version of the subscription, if any. If not provided, the latest version of the plan will be used.
  - `billing_anchor` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `timing` union, required — Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.
    - 'immediate' | 'next_billing_cycle' — Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.
    - string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

## Response `200`

The request has succeeded.

- BillingSubscriptionChangeResponse — Response for changing a subscription.
  - `current` BillingSubscription, required — Subscription.
    - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `created_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `updated_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `deleted_at` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `customer_id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `plan_id` string — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `billing_anchor` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `status` 'active' | 'inactive' | 'canceled' | 'scheduled', required — Subscription status.
    - `settlement_mode` 'credit_then_invoice' | 'credit_only' — Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits.
  - `next` BillingSubscription, required — Subscription.
    - `id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
    - `created_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `updated_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `deleted_at` string, date-time — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `customer_id` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `plan_id` string — ULID (Universally Unique Lexicographically Sortable Identifier).
    - `billing_anchor` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
    - `status` 'active' | 'inactive' | 'canceled' | 'scheduled', required — Subscription status.
    - `settlement_mode` 'credit_then_invoice' | 'credit_only' — Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.net/openmeterio/apis/openmeter-and-konnect-metering-billing-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-and-konnect-metering-billing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-and-konnect-metering-billing-api/versions/9bca44e2d61d/schema)
