commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie billing.payment.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Dit eindpunt vereist geen organisatie-id. Uw sleutel identificeert al de organisatie waartoe deze behoort, en het antwoord is hierop afgestemd.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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`.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
cartId (path) | Uuid | Ja | The cart's id. |
Idempotency-Key (header) | string | Nee | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
billing_country | object | Nee | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | Nee | `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`. |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Ja | Human-friendly order reference. |
status | OrderStatus | Ja | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Ja | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Ja | — |
tax_minor | integer | Ja | — |
discount_minor | integer | Ja | — |
total_minor | integer | Ja | — |
billing_country | object | Nee | — |
placed_at | object | Nee | — |
created_at | string | Ja | — |
updated_at | string | Nee | — |
lines | OrderLine[] | Ja | — |
payments | Payment[] | Ja | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 404 · 409 · 422 · 429