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

# Create hosted AI credit pack checkout session

`POST /api/v1/billing/credits-checkout`

## Request

- Base URL: `https://slatehut.com`
- URL: `https://slatehut.com/api/v1/billing/credits-checkout`
- Auth: HTTP bearer

Returns `{ url }` for a one-time **Stripe Hosted Checkout** payment (`mode: payment`) that adds purchased USD to the workspace `bonusCreditUsd` pool after `checkout.session.completed`. Sessions set `allow_promotion_codes: true`. Owner or admin only.

## Request body

- BillingCreditsCheckoutRequest
  - `packUsd` 10 | 25 | 50, required: One-time pack size in USD

## Response `200`

Stripe Checkout session URL

- BillingCreditsCheckoutResponse
  - `url` string, uri, required

## Other responses

- `400`: Validation or conflict error
- `401`: Missing or invalid credentials
- `403`: Not allowed for this resource
- `500`: Validation or conflict error

---

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