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

# Start a Stripe Checkout subscription

`POST /api/billing/checkout`

## Request

- Base URL: `https://slimlytics.com`
- URL: `https://slimlytics.com/api/billing/checkout`
- Auth: HTTP bearer

Session login only. Existing subscribers receive a Customer Portal URL instead, so plans change without a second subscription.

## Request body

- object
  - `plan` string, required
  - `interval` 'month' | 'year'

## Response `200`

Checkout or portal URL

- object
  - `url` string, uri, required
  - `portal` boolean: True when an existing subscriber is sent to the Customer Portal instead

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Insufficient site role

---

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