---
title: "Start adding a payment method."
method: POST
path: "/v1/billing/payment-method-setup"
tags: ["billing"]
---

# Start adding a payment method.

`POST /v1/billing/payment-method-setup`

## Request

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

Returns a checkout URL where a card is saved for the account; an organization needs one before it can create anything that costs money. Requires the `billing:write` scope.

## Response `200`

Returns {"url": <stripe-hosted url>} for a Stripe Checkout in setup mode that puts a card on file without charging it.

## Other responses

- `401`: Missing or invalid API key
- `403`: Key lacks the required scope
- `404`: Card payments are not enabled on this deployment
- `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/payment-method-setup/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)
