commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
Kimlik Doğrulama
Bearer token olarak bir API anahtarı gönderin. Anahtar billing.payment.manage iznine sahip olmalıdır; bu izne sahip olmayan bir anahtar 404 ile değil, 403 ile reddedilir.
Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Ayrıntılar
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`.
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
cartId (path) | Uuid | Evet | The cart's id. |
Idempotency-Key (header) | string | Hayır | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
İstek gövdesi
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
billing_country | object | Hayır | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | Hayır | `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`. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Evet | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Evet | Human-friendly order reference. |
status | OrderStatus | Evet | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Evet | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Evet | — |
tax_minor | integer | Evet | — |
discount_minor | integer | Evet | — |
total_minor | integer | Evet | — |
billing_country | object | Hayır | — |
placed_at | object | Hayır | — |
created_at | string | Evet | — |
updated_at | string | Hayır | — |
lines | OrderLine[] | Evet | — |
payments | Payment[] | Evet | — |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 409 · 422 · 429