commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Svi commerce krajnji točke

Autentifikacija

Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu billing.payment.manage; ključ bez nje se odbija s kodom 403, a ne 404.

Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.

Isprobajte

Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.

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

Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli

Pojedinosti

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`.

Parametri

NazivVrstaObaveznoŠto je to
cartId (path)UuidDaThe 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.

Tijelo zahtjeva

NazivVrstaObaveznoŠto je to
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`.

Odgovor

NazivVrstaObaveznoŠto je to
idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringDaHuman-friendly order reference.
statusOrderStatusDaAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeDaISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerDa
tax_minorintegerDa
discount_minorintegerDa
total_minorintegerDa
billing_countryobjectNe
placed_atobjectNe
created_atstringDa
updated_atstringNe
linesOrderLine[]Da
paymentsPayment[]Da

Pogreške koje ova krajnja točka može vratiti

401 · 403 · 404 · 409 · 422 · 429