billing

POST /v1/trials

Start a free trial on a plan.

Semua titik akhir billing

Pengesahan

Hantar kunci API sebagai token pembawa. Titik akhir ini tidak menyatakan kebenaran tertentu dalam spesifikasi, jadi berikan kunci anda kebenaran minimum yang diperlukan dan semak respons tersebut daripada membuat andaian.

Tempat ID organisasi anda diletakkan

Titik akhir ini mengambil org_id sebagai medan dalam kandungan JSON.

ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

curl -X POST https://api.zinndigital.com/v1/trials \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "plan_code": <string> }'

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

docs/20. **The endpoint the "Start trial" buttons had nowhere to point at.** Three admin trial endpoints existed — list templates, edit a template, staff-extend a trial — and no customer-facing one, so all 47 CTAs on the public pricing page linked to `?intent=register`: *register first*, which is the opposite of what the button says. ⛔ `plan_code`, never a product line. Eligibility is a property of the **plan** (owner ruling 2026-07-29): cloud and VPS live in the same line as plans that do carry a trial, so a line-shaped request could not express "never on billable per-instance compute" at all. One trial per organization, enforced by a database constraint as well as a check — so a double-click races safely and the loser is refused rather than granted a second trial.

Badan permintaan

NamaJenisDiperlukanApakah ia
plan_codestringYa
org_idstringTidakRequired only when the caller bills for more than one organization. With exactly one it is unambiguous; with several it is asked for rather than guessed, because starting a rese…
auto_convert_opt_inbooleanTidak⛔ Defaults to false — the direction that cannot take money nobody agreed to.

Respons

NamaJenisDiperlukanApakah ia
idstringYa
org_idstringYa
statusstring<active, expired, converted, canceled>Ya
product_linestringYaThe line's CODE, not its display name — the dashboard renders the label from its own catalogue, so prose here would be a second, untranslated source of that word on the screen.
max_sitesintegerYa
started_atstringYa
ends_atstringYa
auto_convert_opt_inbooleanTidakWhether the customer agreed **at the start** that this may become a paid subscription when the period ends. Captured per trial rather than read from the template at expiry, so c…
days_remainingintegerTidakWhole days until `ends_at`, rounded UP and floored at zero. Computed on the server on purpose: a client doing `(ends_at - Date.now())` measures the **device** clock, so a laptop…
upgradeTrialUpgradeOfferTidakThe plan this trial invites the customer to buy, priced in their own currency (`X-Zinn-Currency`, falling back to the org default). ⛔ `null` when the template names no target or…

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 404 · 422