---
title: "Start a hosted Stripe Checkout session for this workspace"
method: POST
path: "/api/workspaces/{slug}/billing/checkout"
tags: ["Internal"]
---

# Start a hosted Stripe Checkout session for this workspace

`POST /api/workspaces/{slug}/billing/checkout`

## Request

- Base URL: `https://tre-app.com`
- URL: `https://tre-app.com/api/workspaces/{slug}/billing/checkout`
- Auth: HTTP bearer

UI plumbing for the billing settings page, not an agent surface. Workspace admins only. 404s when billing is not configured on this installation (self-host). 403 (`This workspace is suspended and read-only`, followed by the support address) while the operator has suspended the workspace; the billing portal stays open. 409 when the workspace already has an active or past-due subscription: the plan is changed from the portal.

## Request body

- BillingCheckout
  - `plan` 'solo' | 'team', required

## Response `200`

Success

- BillingSessionResponse
  - `url` string, uri, required: Hosted Stripe page to redirect the browser to.

## Other responses

- `400`: Invalid request
- `401`: Unauthenticated
- `403`: Forbidden: insufficient role or token scope; scope denials name the held scope and the operation
- `404`: Not found
- `409`: Conflict
- `429`: Rate limited
- `500`: Internal server error
- `503`: Temporarily unavailable

---

[API](https://skmtc.dev/tre-app/apis/tre-rest-api.md) · [All operations](https://skmtc.dev/tre-app/apis/tre-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tre-app/apis/tre-rest-api/revisions/26a7187a05fc?raw)
