---
title: "Public Checkout"
method: POST
path: "/billing/public-checkout"
tags: ["billing"]
---

# Public Checkout

`POST /billing/public-checkout`

Create a Stripe Checkout session without requiring authentication.

Designed for shareable checkout links (/checkout/pro, /checkout/enterprise)
where the user pays before creating a Pioneer account.

Rate-limited to 10 requests per IP per minute since the endpoint is
unauthenticated and each call creates a Stripe Checkout Session.
Captcha verification required in non-local environments.

Args:
    request: FastAPI request (required by SlowAPI rate limiter).
    body: Plan, redirect URLs, and optional email.

Returns:
    Stripe-hosted checkout URL.

## Request body

- PublicCheckoutRequest — Request for unauthenticated checkout via a shareable link.
  - `plan` 'pro' | 'enterprise', required — Target plan to subscribe to
  - `success_url` string, required — URL to redirect to after successful payment
  - `cancel_url` string, required — URL to redirect to if user cancels
  - `email` string, email, nullable — Email address to pre-fill in Stripe checkout
  - `captcha_token` string, nullable — hCaptcha response token for bot verification

## Response `200`

Successful Response

- PublicCheckoutResponse — Response from the unauthenticated checkout endpoint.
  - `success` boolean, required
  - `checkout_url` string, nullable
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/31dfe831e079/schema)
