commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Barcha commerce yakuniy nuqtalari

Autentifikatsiya

API kalitini bearer token sifatida yuboring. Kalit billing.payment.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.

Bu yakuniy nuqta hech qanday tashkilot identifikatorini qabul qilmaydi. Sizning kalitingiz unga tegishli tashkilotni allaqachon aniqlaydi va javob shunga qarab cheklanadi.

Sinab ko'rish

Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.

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

Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching

Tafsilotlar

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

Parametrlar

NomiTuriMajburiyNima bu
cartId (path)UuidHaThe cart's id.
Idempotency-Key (header)stringYo'qClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Soʻrov tanasi

NomiTuriMajburiyNima bu
billing_countryobjectYo'qISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectYo'q`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`.

Javob

NomiTuriMajburiyNima bu
idUuidHaUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidHaUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringHaHuman-friendly order reference.
statusOrderStatusHaAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeHaISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerHa
tax_minorintegerHa
discount_minorintegerHa
total_minorintegerHa
billing_countryobjectYo'q
placed_atobjectYo'q
created_atstringHa
updated_atstringYo'q
linesOrderLine[]Ha
paymentsPayment[]Ha

Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar

401 · 403 · 404 · 409 · 422 · 429