---
title: "Create credit purchase checkout"
method: POST
path: "/agents/credits/purchase"
tags: ["Agents"]
---

# Create credit purchase checkout

`POST /agents/credits/purchase`

Creates a Stripe Checkout Session for the selected credit pack and returns the hosted checkout URL.

## Request body

- CreateCheckout
  - `pack_slug` string, required
  - `success_url` string, uri, required
  - `cancel_url` string, uri, required

## Response `201`

- CheckoutSession
  - `checkout_url` string, uri, required
  - `purchase_id` integer, required

---

[API](https://skmtc.net/cubesoftware/apis/cube-api.md) · [All operations](https://skmtc.net/cubesoftware/apis/cube-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cubesoftware/cube-api/revisions/67d9f45bb99b/schema)
