commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

Gbogbo àwọn commerce endpoints

Gbogbo àwọn ìwé àṣẹ olùgbékalẹ̀ àgbékalẹ̀

Ìfàṣẹ́pọ̀

Fi bọ́ọ̀lù (bearer token) ranṣẹ gẹ́gẹ́ bí kọ́kọ́rọ́ API. Kọ́kọ́rọ́ náà gbọ́dọ̀ ní ìyọ̀ǹda billing.payment.manage; a ó kọ̀ ọ́ silẹ pẹlu 403, kii ṣe 404, ti kọ́kọ́rọ́ náà kò bá ní i.

Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.

Gbiyanju rẹ

Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.

curl -X POST https://api.zinndigital.com/v1/carts/{cartId}/checkout \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API

Àwọn kúlẹ̀kúlẹ̀

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.

Àwọn ìpìlẹ̀

OrúkọIruTí a nílòKini o jẹ
cartId (path)UuidBẹẹniThe cart's id.
Idempotency-Key (header)stringBẹẹkọClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Akoonu ibeere naa

OrúkọIruTí a nílòKini o jẹ
billing_countryobjectBẹẹkọISO 3166-1 alpha-2 country for the tax jurisdiction.
availability_tokensobjectBẹẹkọ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.
gatewayobjectBẹẹkọThe payment rail the customer chose at checkout — one of the codes getPaymentOptions returned for this organization and currency. Omit it and the order is charged wallet-first…
expected_total_minorobjectBẹẹkọThe order total the checkout page displayed to the customer, in minor units. Send it and checkout refuses with 422 when the basket no longer comes to that figure; omit it…

Idahun

OrúkọIruTí a nílòKini o jẹ
idUuidBẹẹniUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidBẹẹniUUIDv7 identifier — sortable by creation time (docs/02 §8).
human_refstringBẹẹniHuman-friendly order reference.
statusOrderStatusBẹẹniAn order's lifecycle state (docs/31 §4.3).
currencyCurrencyCodeBẹẹniISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerBẹẹni
tax_minorintegerBẹẹni
discount_minorintegerBẹẹni
total_minorintegerBẹẹni
billing_countryobjectBẹẹkọ
placed_atobjectBẹẹkọ
created_atstringBẹẹni
updated_atstringBẹẹkọ
linesOrderLine[]Bẹẹni
paymentsPayment[]Bẹẹni

Awọn aṣiṣe ti ibudo ipari yii le da pada

401 · 403 · 404 · 409 · 422 · 429