---
title: "Create a Stripe Checkout link that, when completed, immediately charges amountHal as the first top-up and saves the card for future auto top-ups (works even when a card is already saved); to change only the threshold without a charge, use PATCH /v1/credit/auto-topup instead"
method: POST
path: "/v1/credit/auto-topup/setup"
---

# Create a Stripe Checkout link that, when completed, immediately charges amountHal as the first top-up and saves the card for future auto top-ups (works even when a card is already saved); to change only the threshold without a charge, use PATCH /v1/credit/auto-topup instead

`POST /v1/credit/auto-topup/setup`

## Request

- Base URL: `https://volai.cz`
- URL: `https://volai.cz/v1/credit/auto-topup/setup`
- Auth: HTTP bearer

Creates a Stripe Checkout session whose completion IMMEDIATELY charges `amountHal` as the first top-up, and only that saves the card for future auto top-ups - works even with a card already saved from before. The only way to turn auto top-up on or change its amount; a threshold-only change with no charge is the `PATCH` above. The billing address is required. It is refused with `subscription_cap_active` while a monthly plan runs with the spending cap. Supports `Idempotency-Key`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `thresholdHal` integer, required: Balance threshold that triggers an automatic top-up, in integer halere excluding VAT. Changing only this value does not charge the card.
  - `amountHal` integer, required: Credit added per automatic top-up, in integer halere excluding VAT. Completing setup charges this amount as the first top-up and saves the card.

## Response `200`

Checkout URL

- object
  - `checkoutUrl` string, required

## Other responses

- `400`: Error codes: validation (request), invalid_amount (request), billing_address_required (account).
- `401`: Error codes: unauthorized (request).
- `403`: Error codes: account_suspended (account).
- `404`: Error codes: user_not_found (account).
- `409`: Error codes: idempotency_in_progress (busy), subscription_cap_active (account).
- `429`: Error codes: rate_limited (busy).
- `500`: Error codes: internal_error (service).
- `502`: Error codes: stripe_error (service).
- `503`: Error codes: stripe_not_configured (service).

---

[API](https://skmtc.dev/volai/apis/volai-rest-api.md) · [All operations](https://skmtc.dev/volai/apis/volai-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/volai/apis/volai-rest-api/revisions/12029b05e2fa?raw)
