---
title: "Checkout Product"
method: POST
path: "/api/checkout/{product}"
---

# Checkout Product

`POST /api/checkout/{product}`

## Request

- Base URL: `https://opwhcervi3.execute-api.ca-central-1.amazonaws.com`
- URL: `https://opwhcervi3.execute-api.ca-central-1.amazonaws.com/api/checkout/{product}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`

Creates a Stripe-hosted checkout URL for one product: pro (dxpert Pro, monthly subscription) or roadmap (DX Roadmap, one-time). Both require an account (a Bearer session or an X-Api-Key), because the purchase attaches to it; without one the answer is 401 account_required. Other errors: 404 `unknown_product`; 409 `already_subscribed` (dxpert Pro already active) or `roadmap_already_owned`; 410 `product_retired` for a retired product id (agents are never sold separately; use pro); 422 invalid body; 503 `stripe_unconfigured` / 502 `stripe_error`. It does not charge immediately, consume quota, send email, or change entitlement state.

## Path parameters

- `product` 'pro' | 'roadmap', required: The product to buy: pro (dxpert Pro) or roadmap (DX Roadmap).

## Headers

- `Authorization` string, nullable
- `X-Api-Key` string, nullable

## Request body

- CheckoutRequest
  - `client_ref` string, required

## Response `200`

Successful Response

- CheckoutResponse
  - `checkout_url` string, required

## Other responses

- `401`: `account_required`: sign in or send X-Api-Key; the purchase attaches to an account.
- `404`: `unknown_product`: not a product. See GET /api/catalog.
- `409`: `already_subscribed`: dxpert Pro is already active on this account (or `roadmap_already_owned` for roadmap).
- `410`: `product_retired`: a retired product id. Every agent is included in dxpert Pro: POST /api/checkout/pro.
- `422`: Invalid request body (FastAPI validation error).
- `502`: `stripe_error`: Stripe rejected or failed the request.
- `503`: `stripe_unconfigured`: payments are not configured on this deployment.

---

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