---
title: "Start buying a credit pack"
method: POST
path: "/api/v1/checkout"
tags: ["Account"]
---

# Start buying a credit pack

`POST /api/v1/checkout`

## Request

- Base URL: `https://audo.ai`
- URL: `https://audo.ai/api/v1/checkout`
- Auth: API key in cookie `__Secure-audo.session_token`

Stripe's page (url) takes payment for an hour, then comes back to the page returnTo names (returnTo tool: returnPath) with checkout=<id>, or cancelled=1. An unpaid checkout then reads expired. Only for a person signed in on the website.

## Request body

- object
  - `amountCents` integer, required
  - `returnTo` 'credits' | 'api' | 'tool' | 'page' | 'finish': Where checkout comes back to: credits (the default), api, or tool
  - `returnPath` string: With returnTo tool: the app's tool page, such as /tools/audio-enhancer or /tools/audio-enhancer?job=job_…, or the app's Editor, /editor
  - `tool` 'remove_noise' | 'enhance_voice' | 'transcribe_audio' | 'align_script' | 'cut_audio' | 'remove_silence' | 'adjust_loudness' | 'convert_audio' | 'join_audio' | 'replace_audio' | 'analyze_audio' | 'remove_fillers' | 'level_speakers' | 'mix_tracks': The tool the credits are for, when a tool page asked
  - `jobId` string: The job the credits are for, such as the free run being finished
  - `from` 'pay_sheet' | 'credits' | 'keys' | 'assistant' | 'finish_link': Where the checkout was opened: pay_sheet, credits, keys, assistant, or finish_link
  - `finishToken` string: With jobId: the free run's status link token or finish link token. Once paid, the whole file of that run starts by itself
  - `run` object: A run to start once paid, for files already in the account that haven't run: the tool request (as POST /jobs takes it) without idempotency_key

## Response `201`

OK

- object
  - `id` string, required: The checkout, to ask whether it's paid
  - `url` string, required: Stripe's checkout page, or the simulated one in local development
  - `simulated` boolean, required: Local development: no real payment, and the website completes it itself

## Other responses

- `default`: An error, with what went wrong and what to do next

---

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