commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Všechny koncové body commerce

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění billing.payment.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Tento koncový bod nevyžaduje žádné ID organizace. Váš klíč již identifikuje organizaci, ke které patří, a odpověď je na ni omezena.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

Converts the cart to an **immutable order**: re-prices every line, re-verifies each domain availability token (a stale/taken one is a `409`, with no charge), computes tax, places the order and charges it **wallet-first**. Fulfilment (provisioning/registration) then runs asynchronously as a Temporal workflow — this call never blocks on it (§2.9); poll the order `status` or the resource it produces. An **`Idempotency-Key` header is required**: a retried checkout returns the same order and never charges twice. Requires `billing.payment.manage`.

Parametry

NázevTypPožadovánoCo to je
cartId (path)UuidAnoThe cart's id.
Idempotency-Key (header)stringNeClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Tělo požadavku

NázevTypPožadovánoCo to je
billing_countryobjectNeISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectNe`domain_name` → the availability token issued by the domain search endpoint. Required for every `domain_register` line; each is re-verified at checkout and a stale one is a `409`.

Odpověď

NázevTypPožadovánoCo to je
idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringAnoHuman-friendly order reference.
statusOrderStatusAnoAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeAnoISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerAno
tax_minorintegerAno
discount_minorintegerAno
total_minorintegerAno
billing_countryobjectNe
placed_atobjectNe
created_atstringAno
updated_atstringNe
linesOrderLine[]Ano
paymentsPayment[]Ano

Chyby, které může tento koncový bod vrátit

401 · 403 · 404 · 409 · 422 · 429