Skip to content
POST /organization/{id}/billing/checkout

Starts a per-seat subscription and returns the hosted Checkout URL to redirect the user to. Quantity is the current billable member count, and any remaining local trial is carried into Stripe as trial days. Requires `billing:manage`. Refuses with `subscription_exists` when a live (or past-due) subscription is already attached — change plans through `POST /organization/{id}/billing/portal` instead. Annual billing is Gold only. Gold is charged the tier in `GET /organization/{id}/billing` → `pricing`; a request from a country Elaichi cannot sell to, or through Tor, answers `403 region_unavailable`. A discounted tier is card only.

Path Parameters

idstring
required·

Organization id (org_…).

Request Body

intervalstring

Gold only. year with black is rejected as interval_unsupported.

Possible values:
monthyear
planstring
Possible values:
goldblack

Response Body

seat_countinteger

Quantity submitted to Stripe.

session_idstring
trial_period_daysinteger

Remaining local trial carried into Stripe; 0 charges now.

urlstring · uri

Hosted Stripe Checkout URL — send the browser here.

curl -X POST 'https://api.elaichi.ai/organization/<id>/billing/checkout' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"plan":"gold","interval":"month"}'
const body = {
  "plan": "gold",
  "interval": "month"
};

const response = await fetch('https://api.elaichi.ai/organization/<id>/billing/checkout', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/organization/<id>/billing/checkout"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "plan": "gold",
    "interval": "month"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())