---
title: "Migrate subscription"
method: POST
path: "/v3/openmeter/subscriptions/{subscriptionId}/migrate"
tags: ["OpenMeter Subscriptions"]
---

# Migrate subscription

`POST /v3/openmeter/subscriptions/{subscriptionId}/migrate`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v3/openmeter/subscriptions/{subscriptionId}/migrate`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

**Pre-release Endpoint**
This endpoint is currently in beta and is subject to change.

Migrates to a later version of the current plan. With starting_phase omitted and
billing_anchor omitted or unchanged, migration amends the subscription in place:
unchanged items retain their service periods and both response entries have the
same ID. Existing addons must remain compatible with the target plan.
Incompatible phase timelines or billing settings return an error. Providing
starting_phase or a different billing_anchor explicitly requests replacement,
which resets the phase timeline, may produce billing adjustments, and does not
transfer addons. Custom subscriptions cannot be migrated.

## Path parameters

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

## Request body

- BillingSubscriptionMigrate: Request for migrating to a later version of the subscription's current plan.
  - `timing` union: When the migration takes effect: immediately (default), at the next billing cycle, or at an explicit billing-aligned timestamp. In-place migrations may target a later phase when the phase timelines match. The target plan reference is saved now; changed items take effect at the requested time.
    - '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.
  - `target_version` integer: A strictly later version of the current plan. Omit to use its latest version.
  - `starting_phase` string: Explicitly replace the subscription, starting in this target plan phase. Always selects replacement, even when the phase matches the current one. Replacement may produce billing adjustments and does not transfer addons.
  - `billing_anchor` string, date-time: Providing a different billing anchor explicitly replaces the subscription. The supplied anchor is preserved and may be before or after the replacement's start time. Omit to retain the existing anchor.

## Response `200`

The request has succeeded.

- BillingSubscriptionMigrateResponse: Response for migrating a subscription.
  - `current` object, required: The original subscription's own fields returned by the migration. For an in-place migration this is the before snapshot; for replacement it includes the cancellation. Does not include phases or the current billing period.
    - `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: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity last update date.
    - `deleted_at` string, date-time: An ISO-8601 timestamp representation of entity deletion date.
    - `name` string, required: Display name of the subscription. Defaults to the plan name when the subscription is created from a plan.
    - `description` string: Optional description of the subscription.
    - `active_from` string, date-time, required: An ISO-8601 timestamp representation of when the subscription became (or will become) active.
    - `active_to` string, date-time: An ISO-8601 timestamp representation of when the subscription stops being active. Open-ended when not set.
    - `customer_id` string, required: The customer ID of the subscription.
    - `plan_id` string: The plan ID of the subscription. Set if subscription is created from a plan.
    - `plan` object: The plan the subscription was created from, if any. Includes the plan key and version so clients can resolve the exact plan revision.
      - `id` string, required: The plan ID (exact revision).
      - `key` string, required: The plan key. References the plan across versions.
      - `version` integer, required: The plan version.
    - `invoice_currency` string, required: The fiat currency in which the subscription is invoiced.
    - `cost_basis_mode` 'dynamic' | 'pinned', required: Controls whether custom-currency cost bases are resolved dynamically or pinned when their currency pair is introduced to the subscription.
    - `cost_basis_pins` BillingSubscriptionCostBasisPin[], required: Cost bases pinned to custom-currency pairs for this subscription.
      - `custom_currency_id` string, required: The managed custom currency ID.
      - `invoice_currency` string, required: The fiat currency in which the subscription is invoiced.
      - `cost_basis_id` string, required: The pinned cost basis resource ID.
    - `billing_cadence` string, ISO8601, required: The billing cadence of the subscription in ISO-8601 duration format. Defines how often the customer is billed. Examples: `P1M` (monthly), `P3M` (quarterly), `P1Y` (annually).
    - `pro_rating_config` object: The pro-rating configuration of the subscription.
      - `enabled` boolean, required: Whether pro-rating is enabled.
      - `mode` 'no_proration' | 'prorate_prices', required: How pro-rating is calculated when enabled.
    - `billing_anchor` string, date-time, required: A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day)
    - `status` 'active' | 'inactive' | 'canceled' | 'scheduled', required: The status of the subscription.
    - `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` object, required: The resulting subscription, including its phases and items.
    - `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: An ISO-8601 timestamp representation of entity creation date.
    - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity last update date.
    - `deleted_at` string, date-time: An ISO-8601 timestamp representation of entity deletion date.
    - `name` string, required: Display name of the subscription. Defaults to the plan name when the subscription is created from a plan.
    - `description` string: Optional description of the subscription.
    - `active_from` string, date-time, required: An ISO-8601 timestamp representation of when the subscription became (or will become) active.
    - `active_to` string, date-time: An ISO-8601 timestamp representation of when the subscription stops being active. Open-ended when not set.
    - `customer_id` string, required: The customer ID of the subscription.
    - `plan_id` string: The plan ID of the subscription. Set if subscription is created from a plan.
    - `plan` object: The plan the subscription was created from, if any. Includes the plan key and version so clients can resolve the exact plan revision.
      - `id` string, required: The plan ID (exact revision).
      - `key` string, required: The plan key. References the plan across versions.
      - `version` integer, required: The plan version.
    - `invoice_currency` string, required: The fiat currency in which the subscription is invoiced.
    - `cost_basis_mode` 'dynamic' | 'pinned', required: Controls whether custom-currency cost bases are resolved dynamically or pinned when their currency pair is introduced to the subscription.
    - `cost_basis_pins` BillingSubscriptionCostBasisPin[], required: Cost bases pinned to custom-currency pairs for this subscription.
      - `custom_currency_id` string, required: The managed custom currency ID.
      - `invoice_currency` string, required: The fiat currency in which the subscription is invoiced.
      - `cost_basis_id` string, required: The pinned cost basis resource ID.
    - `billing_cadence` string, ISO8601, required: The billing cadence of the subscription in ISO-8601 duration format. Defines how often the customer is billed. Examples: `P1M` (monthly), `P3M` (quarterly), `P1Y` (annually).
    - `pro_rating_config` object: The pro-rating configuration of the subscription.
      - `enabled` boolean, required: Whether pro-rating is enabled.
      - `mode` 'no_proration' | 'prorate_prices', required: How pro-rating is calculated when enabled.
    - `billing_anchor` string, date-time, required: A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle. It affects when charges occur and how prorations are calculated. Common anchors: - Calendar month (1st of each month): `2025-01-01T00:00:00Z` - Subscription anniversary (day customer signed up) - Custom date (customer-specified day)
    - `status` 'active' | 'inactive' | 'canceled' | 'scheduled', required: The status of the subscription.
    - `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.
    - `current_period` object: The current aligned billing period. Present only when the subscription is active and aligned.
      - `from` string, date-time, required: The start of the period. The period is inclusive at the start.
      - `to` string, date-time, required: The end of the period. The period is exclusive at the end.
    - `phases` BillingSubscriptionPhase[], required: The phases of the subscription in chronological order. A phase groups the rate cards that are in effect for a segment of the subscription's lifetime.
      - `id` string, required: ULID (Universally Unique Lexicographically Sortable Identifier).
      - `name` string, required: Display name of the resource. Between 1 and 256 characters.
      - `description` string: Optional description of the resource. Maximum 1024 characters.
      - `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: An ISO-8601 timestamp representation of entity creation date.
      - `updated_at` string, date-time, required: An ISO-8601 timestamp representation of entity last update date.
      - `deleted_at` string, date-time: An ISO-8601 timestamp representation of entity deletion date.
      - `key` string, required: A key is a unique string that is used to identify a resource.
      - `active_from` string, date-time, required: An ISO-8601 timestamp representation of when the phase becomes active.
      - `active_to` string, date-time: An ISO-8601 timestamp representation of when the phase stops being active. Open-ended for the last phase.
      - `items` BillingSubscriptionItem[], required: The rate cards in effect for this phase, resolved to the version active at the queried time (the currently active version for the current phase, the first version for future phases, and the last version for past phases).
        - `id` string, required: The unique identifier of the subscription item instance.
        - `active_from` string, date-time, required: An ISO-8601 timestamp representation of when this item version becomes active.
        - `active_to` string, date-time: An ISO-8601 timestamp representation of when this item version stops being active.
        - `rate_card` object, required: The rate card describing what the customer gets and pays for this item.
          - `name` string, required: Display name of the resource. Between 1 and 256 characters.
          - `description` string: Optional description of the resource. Maximum 1024 characters.
          - `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 "_".
          - `key` string, required: A key is a unique string that is used to identify a resource.
          - `feature` object: The feature associated with the rate card.
            - `id` string, required: ULID (Universally Unique Lexicographically Sortable Identifier).
          - `currency` union: Overrides the containing plan or add-on currency for this rate card. When omitted, the containing resource currency applies.
            - string: Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
            - string: Custom currency code. It should be a unique code but not conflicting with any existing fiat currency codes.
          - `billing_cadence` string, ISO8601: The billing cadence of the rate card. When null, the charge is one-time (non-recurring). Only valid for flat prices.
          - `price` union, required: The price of the rate card.
            - intersection
              - …
            - intersection
              - …
            - intersection
              - …
            - intersection
              - …
            - intersection
              - …
          - `unit_config` object: Unit conversion configuration for the rate card. Synthesized on read for plans authored with v1 dynamic or package prices: dynamic prices map to a unit price with a multiply unit config, and package prices map to a unit price with a divide unit config. Accepted on create and update only when the UnitConfig feature is enabled on the deployment; otherwise rejected.
            - `operation` 'divide' | 'multiply', required: The arithmetic operation to apply to the raw metered quantity.
            - `conversion_factor` string, required: The factor used in the conversion operation. - For `divide`: `converted = raw / conversionFactor`. - For `multiply`: `converted = raw × conversionFactor`. Must be a positive non-zero value.
            - `rounding` 'ceiling' | 'floor' | 'half_up' | 'none': The rounding mode applied to the converted quantity for invoicing. Defaults to none (no rounding). Entitlement checks always use the precise (unrounded) value.
            - `precision` integer: The number of decimal places to retain after rounding. Only meaningful when rounding is not "none". Defaults to 0 (round to whole numbers).
            - `display_unit` string: A human-readable label for the converted unit shown on invoices and in the customer portal (e.g., "GB", "hours", "M tokens"). Optional. When omitted, no unit label is rendered.
          - `payment_term` 'in_advance' | 'in_arrears': The payment term of the rate card. In advance payment term can only be used for flat prices.
          - `commitments` object: Spend commitments for this rate card. Only applicable to usage-based prices (unit, graduated, volume).
            - `minimum_amount` string: The customer is committed to spend at least the amount.
            - `maximum_amount` string: The customer is limited to spend at most the amount.
          - `discounts` object: The discounts of the rate card.
            - `percentage` number: Percentage discount applied to the price (0–100).
            - `usage` string: Number of usage units granted free before billing starts. Only applies to usage-based lines (not flat fees). Usage is treated as zero until this amount is exhausted.
          - `tax_config` object: The tax config of the rate card.
            - `behavior` 'inclusive' | 'exclusive': Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price. If not specified, the billing profile is used to determine the tax behavior. If not specified in the billing profile, the provider's default behavior is used.
            - `code` object: Tax code applied to the invoice line item.
              - …
          - `entitlement` union: The entitlement template granted to subscribers of a plan or addon containing this rate card. Requires `feature` to be set.
            - intersection
              - …
            - intersection
              - …
            - intersection
              - …

## Other responses

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

## Changes

- **2026-10-15** `7aab863a6daa`: 1 breaking, 2 warning
  - added `#/components/schemas/InvalidParameterMinimumTime, #/components/schemas/InvalidParameterMaximumTime` to the `invalid_parameters/items/` response property `oneOf` list for the response status `400`
  - added the new `key_invalid` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
  - added the new `unique` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- **2026-10-07** `59663dd13a10`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v3/openmeter/subscriptions/:subscriptionId/migrate/post.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
