---
title: "Change billing plan"
method: POST
path: "/api/billing/change-plan"
tags: ["billing", "internal"]
---

# Change billing plan

`POST /api/billing/change-plan`

Upgrades or downgrades the organization's billing plan.

## Request body

- ChangePlanRequest
  - `plan` union, required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Community', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Free', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Starter', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Pro', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Team', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Business', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Enterprise', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'Demo', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'CommercialSelfHosted', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'SelfHostedStandard', required
    - object
      - `base_cents` integer, required — Fixed charge per billing period, in cents.
      - `host_cents` integer, nullable — Charge per host beyond `included_hosts`, in cents.
      - `included_hosts` integer, nullable — Hosts included before per-host charges apply.
      - `included_networks` integer, nullable — Networks included before per-network charges apply.
      - `included_orgs` integer, nullable — Organizations allowed on one self-hosted server instance. `None` = unlimited. Only enforced for self-hosted deployments (see `provision_user`); cloud stays multi-tenant regardless. Defaulted so existing stored plan JSON deserializes unchanged.
      - `included_seats` integer, nullable — Seats included before per-seat charges apply.
      - `network_cents` integer, nullable — Charge per network beyond `included_networks`, in cents.
      - `rate` 'Month' | 'Year', required
      - `seat_cents` integer, nullable — Charge per seat beyond `included_seats`, in cents.
      - `trial_days` integer, required — Length of the free trial, in days. Zero when the plan has no trial.
      - `type` 'SelfHostedPlus', required
  - `rate` 'Month' | 'Year', required

## Response `200`

Plan change initiated

- ApiResponseString
  - `data` string — The result payload. Omitted on failure.
  - `error` string, nullable — Human-readable failure message. Omitted on success.
  - `meta` ApiMeta, required — API metadata included in all responses
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required — `true` when the request succeeded. `false` responses carry `error` instead of `data`.

## Other responses

- `400` — Invalid plan or billing not enabled

---

[API](https://skmtc.net/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.net/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/2df1fc47dfa7/schema)
