commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Όλα τα τελικά σημεία commerce

Πισtoποίηση

Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα billing.payment.manage· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.

Αυτό το τελικό σημείο δεν δέχεται αναγνωριστικό οργανισμού. Το κλειδί σας προσδιορίζει ήδη τον οργανισμό στον οποίο ανήκει, και η απάντηση περιορίζεται σε αυτόν.

Δοκιμάστε το

Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.

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

Παράμετροι

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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.

Σώμα αίτησης

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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`.

Απάντηση

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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