---
title: "Start a credit purchase"
method: POST
path: "/api/v1/credits/checkout"
---

# Start a credit purchase

`POST /api/v1/credits/checkout`

## Request

- Base URL: `https://macfax.com`
- URL: `https://macfax.com/api/v1/credits/checkout`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in header `X-Api-Key`
  - API key in query parameter `api_key`

Creates a Stripe Checkout session for a credit pack and returns its URL. The session binds to the key on the request, so the credits land on that key when payment completes; poll GET /api/v1/credits to confirm. An agent can create the session itself and hand its human one URL, which is the only step it cannot take. Returns 503 while self-serve purchase is closed, with the contact path in meta.

## Request body

- object
  - `sku` 'api_250' | 'api_1k' | 'api_5k', required
  - `return_to` '/developers' | '/lookup/bulk': The Macfax page Stripe returns the buyer to. Defaults to /developers.

## Response `201`

checkout_url to open in a browser.

## Other responses

- `400`: Unknown pack; meta carries the price list.
- `401`: No key on the request.
- `503`: Self-serve purchase not open; meta carries the contact path.

---

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