---
title: "Create a checkout session"
method: POST
path: "/api/billing/checkout"
tags: ["billing", "internal"]
---

# Create a checkout session

`POST /api/billing/checkout`

## Request body

- CreateCheckoutRequest
  - `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
  - `url` string, required — URL to return the user to after checkout completes.

## Response `200`

Checkout session URL

- 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

## Changes

- **2026-07-29** `51af15be596e` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7, subschema #8, subschema #9, subschema #10, subschema #11` from the `plan` request property `oneOf` list
  - added `subschema #1: Community, subschema #2: Free, subschema #3: Starter, subschema #4: Pro, subschema #5: Team, subschema #6: Business, subschema #7: Enterprise, subschema #8: Demo, subschema #9: CommercialSelfHosted, subschema #10: SelfHostedStandard, subschema #11: SelfHostedPlus` to the `plan` request property `oneOf` list
- **2026-07-07** `d8684743dffa` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7, subschema #8, subschema #9` from the `plan` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7, subschema #8, subschema #9, subschema #10, subschema #11` to the `plan` request property `oneOf` list
- **2026-04-20** `f04499e2280f` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7, subschema #8, subschema #9, subschema #10, subschema #11` from the `plan` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6, subschema #7, subschema #8, subschema #9` to the `plan` request property `oneOf` list

[Change history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/billing/checkout/post.md)

---

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