---
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://api.setluca.com`
- URL: `https://api.setluca.com/api/billing/checkout`
- Auth: API key in cookie `luca.session_token`

Returns a Stripe Checkout URL for the tier you name. If the coach has no Stripe customer yet, this creates one and caches it on the coach row. Success and cancel URLs are forced back to the app origin, so you can't redirect a coach off-site.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Headers

- `Luca-API-Version` '1'

## Request body

- CheckoutBody
  - `successUrl` string, uri
  - `cancelUrl` string, uri
  - `tier` 'starter' | 'pro' | 'scale'
  - `billingInterval` 'month' | 'year'

## Response `200`

ok

- BillingCheckoutResponse
  - `url` string, nullable, required
  - `sessionId` string, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: internal error
- `502`: upstream failure
- `503`: service unavailable

---

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