---
title: "A Stripe Checkout URL for the account holder to pay on"
method: POST
path: "/api/v1/checkout"
tags: ["Account"]
---

# A Stripe Checkout URL for the account holder to pay on

`POST /api/v1/checkout`

## Request

- Base URL: `https://pixly.app`
- URL: `https://pixly.app/api/v1/checkout`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://pixly.app/oauth/authorize`, token URL `https://pixly.app/api/oauth/token`, scopes: `tools`)

Call when a tool answers 402. Nothing is charged here: the person completes Stripe's page, credits arrive within seconds, then retry the tool. No active plan → a subscription; active plan → a one-time credit top-up. A subscriber asking for a different plan gets the billing page instead.

## Request body

- object
  - `plan` 'starter' | 'agent' | 'pro_agent' | 'team': Plan to subscribe to, for an account with no active plan. Defaults to "starter". Ignored for a top-up.
  - `topUpUsd` number: For an account that already has a plan: one-time credit top-up amount in USD (10–500, default 10), priced at that plan's rate.

## Response `201`

The link

- object
  - `kind` 'subscribe' | 'top_up' | 'manage', required
  - `url` string, uri, required: Give this to the user. Expires in 24 hours.
  - `summary` string, required
  - `priceUsd` number
  - `credits` number
  - `next` string, required: What to do after handing over the link

## Other responses

- `401`: Missing/invalid credential
- `422`: Invalid input — error.issues lists the offending fields
- `429`: Rate limited — see Retry-After (120 req/min, 30/min for generations)

---

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