commerce
POST /v1/carts/{cartId}/checkout
Check out a cart — place and charge an order.
પ્રમાણીકરણ
એપીઆઈ કી (API key) ને બેરર ટોકન તરીકે મોકલો. કી પાસે billing.payment.manage પરવાનગી હોવી આવશ્યક છે; તેના વગરની કીને 404 ને બદલે 403 સાથે અસ્વીકાર કરવામાં આવશે.
આ એન્ડપૉઇન્ટ કોઈ સંસ્થા આઈડી (organisation id) લેતું નથી. તમારી કી (key) પહેલેથી જ તે જે સંસ્થા સાથે સંબંધિત છે તેની ઓળખ કરે છે, અને પ્રતિસાદ (response) તે જ પૂરતો મર્યાદિત છે.
આયમાવો
કોઈપણ કૌંસમાં રહેલી બાબતને તમારા પોતાના મૂલ્યોથી બદલો અને કી પ્લેસહોલ્ડરને તમારા ડેશબોર્ડની કીથી બદલો.
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_country | object | ના | ISO 3166-1 alpha-2 country for the tax jurisdiction. |
availability_tokens | object | ના | `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`. |
જવાબ
| નામ | પ્રકાર | જરૂરી | તે શું છે |
|---|---|---|---|
id | Uuid | હા | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | હા | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
human_ref | string | હા | Human-friendly order reference. |
status | OrderStatus | હા | An order's lifecycle state (docs/31 §4.3). |
currency | CurrencyCode | હા | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
subtotal_minor | integer | હા | — |
tax_minor | integer | હા | — |
discount_minor | integer | હા | — |
total_minor | integer | હા | — |
billing_country | object | ના | — |
placed_at | object | ના | — |
created_at | string | હા | — |
updated_at | string | ના | — |
lines | OrderLine[] | હા | — |
payments | Payment[] | હા | — |
આ એન્ડપોઇન્ટ જે ભૂલો પરત કરી શકે છે
401 · 403 · 404 · 409 · 422 · 429