commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung billing.payment.manage verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
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`.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
cartId (path) | Uuid | Ja | The cart's id. |
Idempotency-Key (header) | string | Nein | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
billing_country | object | Nein | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | Nein | `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`. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
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 | Nein | — |
placed_at | object | Nein | — |
created_at | string | Ja | — |
updated_at | string | Nein | — |
lines | OrderLine[] | Ja | — |
payments | Payment[] | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 409 · 422 · 429