commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Dukkan commerce wuraren ƙarshe

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

SunaNau'iAna buƙataAbin da yake
cartId (path)UuidEhThe cart's id.
Idempotency-Key (header)stringA'aClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
billing_countryobjectA'aISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectA'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

SunaNau'iAna buƙataAbin da yake
idUuidEhUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidEhUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringEhHuman-friendly order reference.
statusOrderStatusEhAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeEhISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerEh
tax_minorintegerEh
discount_minorintegerEh
total_minorintegerEh
billing_countryobjectA'a
placed_atobjectA'a
created_atstringEh
updated_atstringA'a
linesOrderLine[]Eh
paymentsPayment[]Eh

Kuskuren da wannan matsaya za ta iya maido wa

401 · 403 · 404 · 409 · 422 · 429