commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
Tabbatar da Asali
Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin billing.payment.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.
Wannan wurin ƙarewa ba ya buƙatar ID na ƙungiya. Maɓallin ku ya riga ya gano ƙungiyar da yake ciki, kuma an iyakance amsa a kanta.
Gwada
May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.
curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API
Bayani
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`.
Sigogi
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
cartId (path) | Uuid | Eh | The cart's id. |
Idempotency-Key (header) | string | A'a | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Jikin buƙata
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
billing_country | object | A'a | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | A'a | `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`. |
Martani
| Suna | Nau'i | Ana buƙata | Abin da yake |
|---|---|---|---|
id | Uuid | Eh | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Eh | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | Eh | Human-friendly order reference. |
status | OrderStatus | Eh | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | Eh | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | Eh | — |
tax_minor | integer | Eh | — |
discount_minor | integer | Eh | — |
total_minor | integer | Eh | — |
billing_country | object | A'a | — |
placed_at | object | A'a | — |
created_at | string | Eh | — |
updated_at | string | A'a | — |
lines | OrderLine[] | Eh | — |
payments | Payment[] | Eh | — |
Kuskuren da wannan matsaya za ta iya maido wa
401 · 403 · 404 · 409 · 422 · 429