---
title: "Api Checkout"
method: POST
path: "/v1/billing/checkout"
---

# Api Checkout

`POST /v1/billing/checkout`

## Request

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

## Request body

- ApiCheckoutRequest
  - `expected_user_id` string, uuid, nullable
  - `pack_id` 'credits_300' | 'credits_1000' | 'credits_2000' | 'credits_5000' | 'credits_25000', required
  - `idempotency_key` string, uuid, required
  - `return_url` string, uri, required

## Response `200`

Successful Response

- ApiPurchaseResponse
  - `purchase_id` string, uuid, required
  - `status` string, required
  - `checkout_url` string, nullable
  - `credits` integer, required
  - `price_cents` integer, required
  - `currency` string, required
  - `credits_granted` boolean, required
  - `payment_intent_id` string, nullable
  - `client_secret` string, nullable
  - `action_url` string, nullable
  - `action_type` string, nullable
  - `failure_reason` string, nullable

## Other responses

- `422`: Validation Error

---

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