---
title: "Create a Stripe checkout link to upgrade to a paid plan (0 credits, works even when over limit)"
method: POST
path: "/v1/billing/checkout"
---

# Create a Stripe checkout link to upgrade to a paid plan (0 credits, works even when over limit)

`POST /v1/billing/checkout`

## Request

- Base URL: `https://swathapi.com`
- URL: `https://swathapi.com/v1/billing/checkout`
- Auth: HTTP bearer

Returns a Stripe-hosted checkout URL for the chosen plan. Billing calls cost 0 credits so an over-limit account can always upgrade. The user opens the returned url in a browser to pay.

## Request body

- object
  - `plan` 'starter' | 'developer' | 'scale', required: starter = 5,000 credits/mo; developer = 40,000; scale = 600,000

## Response `200`

Checkout session created

- object
  - `url` string, required: Stripe-hosted checkout page URL — open in a browser

## Other responses

- `400`: plan must be 'starter', 'developer' or 'scale'
- `401`: Missing, invalid, or revoked API key. Fix: pass Authorization: Bearer sk_... (get a key at /v1/signup).
- `402`: Monthly credit limit reached (code credits_exhausted). Fix: upgrade via POST /v1/billing/checkout or wait for the monthly reset.
- `429`: Per-minute rate limit for the plan exceeded (code rate_limited). Retry after a short wait.
- `503`: Billing not configured on this deployment

---

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