commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

تمام commerce اینڈ پوائنٹس

توثيقِ شناخت

ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس 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`.

پیرامیٹرز

نامقسملازمییہ کیا ہے
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