commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

All commerce endpoints

Authentication

Send an API key as a bearer token. The key must carry the billing.payment.manage permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

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

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

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

Parameters

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

Request body

NameTypeRequiredWhat it is
billing_countryobjectNoISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectNo`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`.

Response

NameTypeRequiredWhat it is
idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringYesHuman-friendly order reference.
statusOrderStatusYesAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeYesISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerYes
tax_minorintegerYes
discount_minorintegerYes
total_minorintegerYes
billing_countryobjectNo
placed_atobjectNo
created_atstringYes
updated_atstringNo
linesOrderLine[]Yes
paymentsPayment[]Yes

Errors this endpoint can return

401 · 403 · 404 · 409 · 422 · 429