---
title: "Start a prepaid top-up."
method: POST
path: "/v1/billing/checkout-session"
tags: ["billing"]
---

# Start a prepaid top-up.

`POST /v1/billing/checkout-session`

## Request

- Base URL: `https://api.smolmachines.com`
- URL: `https://api.smolmachines.com/v1/billing/checkout-session`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/smolmachines/apis/smolfleet-api/docs/v1/billing/checkout-session/post.ts> (a function with typed inputs; its response is checked against the schema)

Starts a one-time Stripe Checkout to add prepaid credit; the wallet is credited when Stripe's webhook confirms payment. Requires the `billing:write` scope.

## Response `200`

Start a one-time Stripe Checkout to add prepaid credit. Request body: {"amount_usd": <1..=2000>}. Returns {"url": <stripe-hosted checkout url>}; redirect the browser there. The wallet is credited only when Stripe's webhook confirms payment.

## Other responses

- `401`: Missing or invalid API key
- `403`: Key lacks the required scope
- `429`: Rate limited; retry after the Retry-After header
- `500`: Internal error

## Changes

- **2026-10-16** `bc31fc04a568`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smolmachines/apis/smolfleet-api/changes/v1/billing/checkout-session/post.md)

---

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