---
title: "Create credit pack checkout session"
method: POST
path: "/billing/credits/checkout"
tags: ["billing"]
---

# Create credit pack checkout session

`POST /billing/credits/checkout`

## Request

- Base URL: `https://api.whoisgeni.us` (the document declares no server; this is the origin it was published from)
- URL: `https://api.whoisgeni.us/billing/credits/checkout`
- Auth: HTTP bearer

Create a Stripe Checkout Session for a one-time credit pack purchase.

Maps the requested pack to a Stripe price ID and creates a payment-mode
checkout session. Returns the checkout URL for client-side redirect.

## Headers

- `X-API-Key` string, nullable

## Request body

- CreditCheckoutRequest: Request body for creating a Stripe Checkout Session for credit packs.
  - `pack` '100_credits' | '500_credits' | '2000_credits', required
  - `success_url` string, required
  - `cancel_url` string, required

## Response `200`

Successful Response

- ApiResponseCreditCheckoutResponse
  - `data` CreditCheckoutResponse: Response body after creating a credit pack checkout session.
    - `checkout_url` string, required
    - `session_id` string, required
  - `error` ErrorDetail: Structured error information for API error responses. Attributes: code: Machine-readable error code (e.g. "JOB_NOT_FOUND"). message: Human-readable error description. details: Optional additional context for debugging.
    - `code` string, required
    - `message` string, required
    - `details` object, nullable
  - `meta` object, nullable

## Other responses

- `401`: Unauthorized — missing or invalid API key/JWT.
- `422`: Validation Error

---

[API](https://skmtc.dev/whoisgeni/apis/whoisgenius.md) · [All operations](https://skmtc.dev/whoisgeni/apis/whoisgenius/llms.txt) · [OpenAPI document](https://skmtc.dev/whoisgeni/apis/whoisgenius/revisions/707f1c34f6b3?raw)
