commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

すべての commerce エンドポイント

認証

ベアラー トークンとして API キーを送信します。キーには billing.payment.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

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

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブ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`.

パラメータ

名前タイプ必須これがその内容です
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.

リクエスト本文

名前タイプ必須これがその内容です
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`.

返信

名前タイプ必須これがその内容です
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