# Start a checkout

`POST /api/v1/workspaces/{workspaceId}/billing/checkout`

Starts paying for a workspace without a subscription: the answer is the checkout the browser opens. The plan changes once the payment is confirmed. Owner only.

Sign-in: a dashboard session only. API tokens and OAuth sign-ins get `403 token.not_allowed`.

Section: Plans and billing. Operation id in openapi.json: `open_billing_checkout`.

## Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `workspaceId` | path | yes | string (uuid) | The workspace's id. |

## Request body

Required: yes.

`application/json`: PlanChoice

| Field | Type | Required | Description |
|---|---|---|---|
| `checkPacks` | integer | no | Packs of 50 checks (Solo and above), 0–100. |
| `period` | BillingPeriod | yes |  |
| `plan` | string | yes | `solo_2026`, `team_2026` or `business_2026`. |
| `serverPacks` | integer | no | Packs of 5 servers, private nodes (Solo and above), 0–100. |

## Responses

Errors are `application/problem+json` (`Problem`); branch on `type`.

### 200

The checkout to open.

`application/json`: CheckoutView

| Field | Type | Required | Description |
|---|---|---|---|
| `clientToken` | string | yes | The client-side token for `Paddle.Initialize`. |
| `environment` | string | yes | `sandbox` or `live` (`Paddle.Environment.set("sandbox")` for the sandbox). |
| `transactionId` | string | yes | Paddle's transaction: `Paddle.Checkout.open({transactionId})`. |

### 400

Bad Request.

- `request.malformed`: the body or a parameter is not of the expected shape
- `auth.credentials_conflict`: the request carries both a session cookie and a token

### 401

Unauthorized.

- `auth.unauthenticated`, `auth.session_expired`: no session, or it ended
- `token.invalid`: the token is malformed, unknown, revoked or expired, or its creator left the workspace

### 403

Forbidden.

- `auth.forbidden`: your role is too low for this
- `token.not_allowed`: this operation needs a signed-in session; tokens cannot call it
- `request.origin_mismatch`, `request.header_required`: a changing request with a session comes from another site or lacks `X-Monitorly-Request: 1`
- `plan.feature_unavailable`: the plan does not include the feature (a custom domain, a private page, hiding the branding, add-on packs); `detail` names the plan that does

### 404

Not Found.

- `request.not_found`: it does not exist, or you cannot see it

### 409

Conflict.

- `billing.subscription_exists`: the workspace already has a subscription: change its plan instead

### 413

Payload Too Large.

- `request.too_large`: the body is larger than 256 KiB

### 422

Unprocessable Entity.

- `field.required`, `field.too_long`, `field.invalid`: a field breaks a rule; `errors` points at it

### 429

Too Many Requests.

- `session.rate_limited`: more than 5 changes a second from your sessions

### 502

Bad Gateway.

- `billing.provider_failed`: the payment provider refused or did not answer; nothing changed

### 503

Service Unavailable.

- `billing.unavailable`: this installation takes no payments

Schemas named above are listed with their fields in [the schema list](https://docs.monitorly.cloud/api/reference/schemas.md).
