commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
Xaqiijinta aqoonsiga
U dir furaha API ah calaamad dusha ah (bearer token). Furaha waa inuu wataa ruqadda billing.payment.manage; furaha aan wadan waxaa loo diidayaa 403, ee ma aha 404.
Boggan ma qaato aqoonsiga ururka. Furahaagu wuxuu horay u aqoonsanayaa ururka uu ka tirsan yahay, jawaabtuna waxay ku kooban tahay halkaas.
Isku day
Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.
curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API
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`.
Cabiraha
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
cartId (path) | Uuid | Haa | The cart's id. |
Idempotency-Key (header) | string | Maya | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Codsiga jidhkiisa
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
billing_country | object | Maya | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | Maya | `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`. |
Jawaab
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
id | Uuid | Haa | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Haa | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Haa | Human-friendly order reference. |
status | OrderStatus | Haa | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Haa | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Haa | — |
tax_minor | integer | Haa | — |
discount_minor | integer | Haa | — |
total_minor | integer | Haa | — |
billing_country | object | Maya | — |
placed_at | object | Maya | — |
created_at | string | Haa | — |
updated_at | string | Maya | — |
lines | OrderLine[] | Haa | — |
payments | Payment[] | Haa | — |
Cilladaha ay bartaani soo celin karto
401 · 403 · 404 · 409 · 422 · 429