commerce

POST /v1/carts/{cartId}/checkout

Check out a cart — place and charge an order.

සියලුම commerce අන්ත ලක්ෂ්‍ය

සත්‍යාපනය

බෙරර් ටෝකනයක් ලෙස API යතුරක් යවන්න. යතුරෙහි billing.payment.manage අවසරය තිබිය යුතුය; එය නොමැති යතුරක් 404 ලෙස නොව 403 ලෙස ප්‍රතික්ෂේප කෙරේ.

මෙම අවසාන ලක්ෂ්‍යය සඳහා සංවිධාන හැඳුනුම්පතක් (organisation id) අවශ්‍ය නොවේ. ඔබගේ යතුර මඟින් එය අයත් වන සංවිධානය දැනටමත් හඳුනා ගන්නා අතර, ප්‍රතිචාරය ඒ වෙත සීමා වේ.

උත්සාහ කරන්න

<අගයන්> සමඟ කෝණික වරහන් තුළ ඇති ඕනෑම දෙයක් සහ ඔබේ උපකරණ පුවරුවෙන් ලබාගත් යතුරක් සමඟ key ස්ථාන දායකය ප්‍රතිස්ථාපනය කරන්න.

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

පරාමිතීන්

නමවර්ගයඅත්‍යවශ්‍යයිඑය කුමක්ද
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.

ඉල්ලුම් පත්‍ර ශරීරය

නමවර්ගයඅත්‍යවශ්‍යයිඑය කුමක්ද
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`.

පsspil

නමවර්ගයඅත්‍යවශ්‍යයිඑය කුමක්ද
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