---
title: "Create a Stripe Checkout session"
method: POST
path: "/api/billing/checkout"
tags: ["Billing"]
---

# Create a Stripe Checkout session

`POST /api/billing/checkout`

## Request

- Base URL: `https://trydock.ai`
- URL: `https://trydock.ai/api/billing/checkout`
- Auth: HTTP bearer

Low-level — returns a Checkout URL for entering a card. Prefer `POST /api/billing/upgrade` in most flows; that handles the plan-switch branches too. Use this when you specifically want a fresh Checkout (e.g. after a portal cancellation). 409s if a subscription already exists.

## Request body

- object
  - `plan` 'pro' | 'scale': Target plan. Defaults to `pro`.

## Response `200`

Checkout URL.

- object
  - `url` string, uri, required
  - `plan` 'pro' | 'scale', required

## Other responses

- `400`: Stripe not configured on this deployment.
- `409`: Subscription already exists, or org is on design-partner Scale at $0.

---

[API](https://skmtc.dev/trydock/apis/dock-rest-api.md) - [All operations](https://skmtc.dev/trydock/apis/dock-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trydock/apis/dock-rest-api/revisions/dd96ae96a412?raw)
