commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Bütün commerce nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Açar billing.payment.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.

Bu endpoint heç bir təşkilat ID-si tələb etmir. Sizin açarınız artıq aid olduğu təşkilatı müəyyən edir və cavab həmin təşkilat üçün məhdudlaşdırılır.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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

Parametrlər

AdTipTələb olunurNədir
cartId (path)UuidBəliThe cart's id.
Idempotency-Key (header)stringXeyrClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Sorğu gövdəsi

AdTipTələb olunurNədir
billing_countryobjectXeyrISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectXeyr`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`.

Cavab

AdTipTələb olunurNədir
idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringBəliHuman-friendly order reference.
statusOrderStatusBəliAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeBəliISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerBəli
tax_minorintegerBəli
discount_minorintegerBəli
total_minorintegerBəli
billing_countryobjectXeyr
placed_atobjectXeyr
created_atstringBəli
updated_atstringXeyr
linesOrderLine[]Bəli
paymentsPayment[]Bəli

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 404 · 409 · 422 · 429