---
title: "Create Stripe Checkout session"
method: POST
path: "/v1/billing/checkout"
tags: ["Billing"]
---

# Create Stripe Checkout session

`POST /v1/billing/checkout`

## Request

- Base URL: `https://api.agentry.sh`
- URL: `https://api.agentry.sh/v1/billing/checkout`
- Auth: HTTP bearer

Durable account-scoped Stripe saga. Requires a stable Idempotency-Key, serializes all billing session creation for the account, forwards deterministic per-phase Stripe keys, and encrypts the bearer-like checkout_url with AGENTRY_TOKEN_ENC_KEY. Exact retries recover the same URL; changed evidence conflicts.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `plan` 'nerve', required
  - `success_url` string
  - `cancel_url` string

## Response `200`

OK

- object
  - `command_id` string, required
  - `checkout_url` string, required
  - `session_id` string, required
  - `customer_id` string, required
  - `subscription_id` string, nullable
  - `plan` 'nerve', required
  - `price_id` string, required
  - `idempotent_replay` boolean, required
  - `next_action` string

## Other responses

- `202`: The same or another account billing mutation owns the bounded lease; honor Retry-After and preserve this request's Idempotency-Key
- `428`: Stable Idempotency-Key required
- `default`: Error

---

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