commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Lahat ng commerce endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na billing.payment.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

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

Mga Parameter

PangalanUriKailanganAno ito
cartId (path)UuidOoThe cart's id.
Idempotency-Key (header)stringHindiClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Katawan ng kahilingan

PangalanUriKailanganAno ito
billing_countryobjectHindiISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectHindi`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`.

Tugon

PangalanUriKailanganAno ito
idUuidOoUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidOoUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringOoHuman-friendly order reference.
statusOrderStatusOoAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeOoISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerOo
tax_minorintegerOo
discount_minorintegerOo
total_minorintegerOo
billing_countryobjectHindi
placed_atobjectHindi
created_atstringOo
updated_atstringHindi
linesOrderLine[]Oo
paymentsPayment[]Oo

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 409 · 422 · 429