OpenMeter Subscriptions

Create subscription

Changed on
post/openmeter/subscriptions

Request

  • Base URL: http://localhost:8888/api/v3
  • URL: http://localhost:8888/api/v3/openmeter/subscriptions
  • Auth: none declared

Request body

labelsLabels

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.
starting_phasestring

The key of the phase to start the subscription in. If not provided, the subscription starts in the first phase of the plan.

Only applies when creating from a published plan; custom plans define their own phases inline.

billing_anchorstring date-time

RFC3339 formatted date-time string in UTC.

cost_basis_mode'dynamic' | 'pinned'

Controls how custom-currency cost bases are selected for the subscription.

Response

Subscription created response.

idstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

labelsLabels

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_atstring date-time required

RFC3339 formatted date-time string in UTC.

updated_atstring date-time required

RFC3339 formatted date-time string in UTC.

deleted_atstring date-time

RFC3339 formatted date-time string in UTC.

namestring required

Display name of the subscription. Defaults to the plan name when the subscription is created from a plan.

descriptionstring

Optional description of the subscription.

active_fromstring date-time required

RFC3339 formatted date-time string in UTC.

active_tostring date-time

RFC3339 formatted date-time string in UTC.

customer_idstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

plan_idstring

ULID (Universally Unique Lexicographically Sortable Identifier).

invoice_currencystring required

Three-letter ISO4217 currency code. Custom three-letter currency codes are also supported for convenience.

cost_basis_mode'dynamic' | 'pinned' required

Controls how custom-currency cost bases are selected for the subscription.

billing_cadencestring ISO8601 required
billing_anchorstring date-time required

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.

Changes

    • breaking

      added to the ///////// request property allOf list

    • warning

      removed from the ///////// request property allOf list

    • info

      added to the ///////// response property allOf list for the response status

    • info

      removed from the ///////// response property allOf list for the response status

    • info

      added the new optional request property