extras

POST /v1/extras/{code}/purchase

Purchase an extra service.

सभी extras एंडपॉइंट्स

प्रमाणन

बेरर टोकन के रूप में एक API कुंजी भेजें। कुंजी के पास billing.payment.manage अनुमति होनी चाहिए; इसके बिना एक कुंजी को 404 के बजाय 403 के साथ अस्वीकार कर दिया जाता है।

जहां आपकी संगठन आईडी आती है

यह एंडपॉइंट JSON बॉडी में एक फ़ील्ड के रूप में org_id लेता है।

आपकी ऑर्गनाइजेशन आईडी आपके डैशबोर्ड पर एपीआई कीज़ स्क्रीन पर, की के ठीक बगल में मौजूद है। यह आपके द्वारा की जाने वाली हर कॉल में समान आईडी होती है।

इसे आज़माएँ

कोणार्कित ब्रैकेट्स में दी गई किसी भी चीज़ को अपने मानों से बदलें, और की प्लेसहोलर को अपने डैशबोर्ड की एक की से बदलें।

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_idUuidनहींUUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idobjectनहीं
domain_idobjectनहीं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.…
currencyCurrencyCode | 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_withstring<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…

प्रतिक्रिया

नामप्रकारआवश्यकयह क्या है
idUuidहाँUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidहाँUUIDv7 identifier — sortable by creation time (docs/02 §8).
extra_idUuidहाँUUIDv7 identifier — sortable by creation time (docs/02 §8).
site_idobjectनहीं
domain_idobjectनहीं
statusExtraPurchaseStatusहाँAn extra purchase's lifecycle state.
categorystringहाँ
fulfilment_typeExtraFulfilmentTypeहाँHow an extra is delivered.
intervalExtraIntervalहाँOne-off charge or a recurring subscription.
priceMoneyAmountहाँA money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8).
recurrencestring<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_onobjectनहीं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_atobjectनहीं
completed_atobjectनहीं
failure_reasonstringनहीं
created_atstringहाँ
updated_atstringहाँ

त्रुटियाँ जो यह एंडपॉइंट लौटा सकता है

401 · 403 · 404 · 422 · 429