Chatasist
Open App
Developers/Billing & provisioning

Billing & provisioning

The billing API: plan catalog, checkout, current subscription, and workspace creation.

Chatasist billing is handled through a checkout overlay and a small API. This page covers the customer-facing endpoints your integration can call.

The in-app billing settings UI is not shipped yet — the endpoints below back that future screen, and you can call them directly in the meantime.

Billing API#

MethodPathPurpose
GET/api/billing/plansPublic plan catalog and the price reference for self-serve plans.
GET/api/settings/billingCurrent workspace plan, status, limits, and usage (AI resolutions used/limit, seats used/limit, period end).
POST/api/settings/billing/checkoutStart a checkout for a plan.

Starting a checkout#

POST /api/settings/billing/checkout with a plan returns everything the front end needs to open the checkout overlay:

{
  "price_id": "pri_…",
  "client_token": "…",
  "sandbox": true,
  "customer_email": "owner@example.com",
  "custom_data": { "company_id": 123, "plan": "starter" },
  "trial": true,
  "trial_days": 7
}
  • Non-self-serve plans (such as Free) are rejected with 422.
  • If a plan's price isn't available yet you also get 422 — retry shortly or contact support.
  • trial is whether this checkout includes the free trial and trial_days is its length. The trial is once per workspace, all-time, and only on trial-eligible plans (Starter). Once a workspace has used its trial, checkout returns trial: false and subscribes without one.

On success the overlay completes the purchase and the workspace's subscription updates automatically. GET /api/settings/billing then reflects the new plan, plan_status (active, trialing, past_due, or canceled), and current_period_end.

Workspace provisioning#

MethodPathPurpose
POST/api/companiesCreate a workspace. Always provisions on Free; a paid plan is returned as upgrade_plan so the client can launch checkout afterward, and redirects to /onboarding.

During creation a workspace can optionally bootstrap a knowledge base from the website URL you provide.

Plans & pricing

The plan catalog, regional pricing, and annual billing.