commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation billing.payment.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
cartId (path) | Uuid | Oui | The cart's id. |
Idempotency-Key (header) | string | Non | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
billing_country | object | Non | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | Non | `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`. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Oui | Human-friendly order reference. |
status | OrderStatus | Oui | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Oui | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Oui | — |
tax_minor | integer | Oui | — |
discount_minor | integer | Oui | — |
total_minor | integer | Oui | — |
billing_country | object | Non | — |
placed_at | object | Non | — |
created_at | string | Oui | — |
updated_at | string | Non | — |
lines | OrderLine[] | Oui | — |
payments | Payment[] | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 409 · 422 · 429