---
title: "Start paying for a plan"
method: POST
path: "/workspaces/{id}/checkout"
tags: ["billing"]
---

# Start paying for a plan

`POST /workspaces/{id}/checkout`

## Request

- Base URL: `https://api.swingfactor.ai/v1`
- URL: `https://api.swingfactor.ai/v1/workspaces/{id}/checkout`
- Auth: HTTP bearer

Refused with 409 `already_subscribed` while a subscription is live: a second checkout would start a second subscription, and the first would go on billing. Change plan instead.

## Path parameters

- `id` string, uuid, required

## Request body

- CheckoutBody
  - `plan` 'investigator' | 'institute', required
  - `cycle` 'monthly' | 'annual', required
  - `quantity` integer

## Response `200`

Where to send the browser.

- RedirectUrl
  - `url` string, uri, required

## Other responses

- `401`: No token, or not a valid one: `unauthorized`.
- `403`: Only the owner manages billing.
- `409`: Already subscribed.

---

[API](https://skmtc.dev/swingfactor/apis/swingfactor-api.md) · [All operations](https://skmtc.dev/swingfactor/apis/swingfactor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/swingfactor/apis/swingfactor-api/revisions/c2fe881a39c3?raw)
