billing

POST /v1/trials

Start a free trial on a plan.

Tất cả các điểm cuối billing

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Điểm cuối này không nêu rõ quyền cụ thể trong thông số kỹ thuật, vì vậy hãy cấp cho khóa của bạn quyền tối thiểu cần thiết và kiểm tra phản hồi thay vì phỏng đoán.

Nơi điền id tổ chức của bạn

Endpoint này nhận org_id làm một trường trong phần thân JSON.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
plan_codestring
org_idstringKhôngRequired 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_inbooleanKhông⛔ Defaults to false — the direction that cannot take money nobody agreed to.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
org_idstring
statusstring<active, expired, converted, canceled>
product_linestringThe 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_sitesinteger
started_atstring
ends_atstring
auto_convert_opt_inbooleanKhôngWhether 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_remainingintegerKhôngWhole 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…
upgradeTrialUpgradeOfferKhôngThe 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…

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 422