commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Të gjitha pikat e skajshme commerce

Autentifikimi

Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen billing.payment.manage; një çelës pa të refuzohet me 403, jo 404.

Ky pikëndalim nuk pranon id të organizatës. Çelësi juaj tashmë identifikon organizatën së cilës i përket dhe përgjigjja kufizohet vetëm për atë.

Provoje

Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.

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

Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së

Detajet

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

Parametrat

EmriLlojiKërkohetÇfarë është kjo
cartId (path)UuidPoThe cart's id.
Idempotency-Key (header)stringJoClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Trupi i kërkesës

EmriLlojiKërkohetÇfarë është kjo
billing_countryobjectJoISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectJo`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`.

Përgjigja

EmriLlojiKërkohetÇfarë është kjo
idUuidPoUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidPoUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringPoHuman-friendly order reference.
statusOrderStatusPoAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodePoISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerPo
tax_minorintegerPo
discount_minorintegerPo
total_minorintegerPo
billing_countryobjectJo
placed_atobjectJo
created_atstringPo
updated_atstringJo
linesOrderLine[]Po
paymentsPayment[]Po

Gabimet që ky pikëndalim mund të kthejë

401 · 403 · 404 · 409 · 422 · 429