commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Барлық commerce соңғы нүктелері

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Кілтте billing.payment.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.

Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.

Әрекет етіп көру

Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.

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

Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз

Мәліметтер

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

Параметрлер

АтыTүріМіндеттіМазмұны
cartId (path)UuidИәThe cart's id.
Idempotency-Key (header)stringЖоқClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Сұрау денесі

АтыTүріМіндеттіМазмұны
billing_countryobjectЖоқISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectЖоқ`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`.

Жауап

АтыTүріМіндеттіМазмұны
idUuidИәUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidИәUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringИәHuman-friendly order reference.
statusOrderStatusИәAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeИәISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerИә
tax_minorintegerИә
discount_minorintegerИә
total_minorintegerИә
billing_countryobjectЖоқ
placed_atobjectЖоқ
created_atstringИә
updated_atstringЖоқ
linesOrderLine[]Иә
paymentsPayment[]Иә

Бұл соңғы нүкте қайтара алатын қателер

401 · 403 · 404 · 409 · 422 · 429