प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग billing.payment.manage अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
तपाईंको संस्थाको आइडी राख्ने ठाउँ
यो इन्डपोटले JSON बडीमा एक फिल्डको रूपमा org_id लिन्छ।
तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
curl -X POST https://api.zinndigital.com/v1/extras/{code}/purchase \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'लगइन गर्नुभएको छ? तपाईंको ड्यासबोर्डमा रहेको API कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई API कन्सोलमा खोल्नुहोस्
विवरणहरू
Buys the extra: it is charged wallet-first then gateway, and handed to durable fulfilment (an automated workflow, or a staff task). The price and fulfilment path are server-decided (docs/26 §3). Requires `billing.payment.manage`. Two different `422`s, and a client must tell them apart: `PAYMENT_METHOD_REQUIRED` means the organization holds no chargeable payment method, so nothing was presented to any gateway and nothing was refused — the remedy is to add a card and buy again. `UNPROCESSABLE_ENTITY` on this path is a genuine gateway decline. Reporting the first as the second tells a customer who has never entered a card that their bank refused them (`docs/491` §7).
प्यारामिटरहरू
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
code (path) | string | हुन्छ | The extra's code (e.g. `db_maintenance`). |
अनुरोध बडी
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
org_id | Uuid | हैन | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | object | हैन | — |
domain_id | object | हैन | The domain a **domain-scoped** extra is bought for. Premium DNS (`premium_dns`) is the first: it is applied at the registrar, per zone, on a name held in our registrar account.… |
currency | CurrencyCode | null | हैन | The currency the customer was quoted in on the catalogue screen. Omit it and the engine uses the `X-Zinn-Currency` header. `Extra` rows are stored in the base currency only, so… |
pay_with | string<card, credit> | हैन | Where the money comes from. Owner ruling 2026-08-24: *"Credit pays, or card — customer picks"*. Only the AI products (`ai_webmaster`, `ai_update_guard` and any other row in thos… |
प्रतिक्रिया
| नाम | प्रकार | आवश्यक | यो के हो |
|---|---|---|---|
id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
extra_id | Uuid | हुन्छ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
site_id | object | हैन | — |
domain_id | object | हैन | — |
status | ExtraPurchaseStatus | हुन्छ | An extra purchase's lifecycle state. |
category | string | हुन्छ | — |
fulfilment_type | ExtraFulfilmentType | हुन्छ | How an extra is delivered. |
interval | ExtraInterval | हुन्छ | One-off charge or a recurring subscription. |
price | MoneyAmount | हुन्छ | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
recurrence | string<none, active, ended> | हुन्छ | Whether the recurrence behind this purchase is still live. `none` = it never recurred (a one-off); `active` = a scheduled charge exists; `ended` = it recurred and no longer does… |
next_renewal_on | object | हैन | The next charge date, or `null`. Also `null` for a live charge that has no date scheduled yet, so read `recurrence` — not this field — to decide whether a purchase renews at all. |
sla_due_at | object | हैन | — |
completed_at | object | हैन | — |
failure_reason | string | हैन | — |
created_at | string | हुन्छ | — |
updated_at | string | हुन्छ | — |
यो इन्डपोइन्टले फर्काउन सक्ने त्रुटिहरू
401 · 403 · 404 · 422 · 429