Skip to content
GET /organization/{id}/billing

Returns the organization's subscription and seat state. Requires the `billing:view` permission. For what the org may actually use, prefer `GET /organization/{id}/entitlements`.

Path Parameters

idstring
required·

Organization id (org_…).

Response Body

pricingobject
required·

What this org's next Gold purchase charges: the tier from its first purchase if it has one, otherwise the tier for the country the request comes from.

availableboolean

False only for a country Elaichi cannot sell to; a purchase from there is refused with region_unavailable.

countrystring,null

ISO 3166-1 alpha-2 the price is based on, or null when unknown (which prices as list).

currencystring

Lowercase ISO 4217 the gold amounts are in.

discount_pctinteger

How far the monthly price is off the list monthly price in the same currency, to the nearest point (0 at list). Not always the tier’s own discount, since each currency’s amounts are rounded on their own.

goldobject

Per-seat price for one cycle in currency minor units, exactly what is charged. year is the year total.

2 properties
monthobject
1 property
unit_amountinteger
yearobject
1 property
unit_amountinteger
listobject

List (t0) price to show the discount against: in currency when list price is set in it, else USD. Display only.

2 properties
currencystring
goldobject
2 properties
monthobject
1 property
unit_amountinteger
yearobject
1 property
unit_amountinteger
regionalboolean

tier !== "t0".

tierstring

Tier id: t0 (list) to t4 by GDP band, or a country tier such as in (India).

available_plansobject

Which plans and billing intervals can be purchased.

blackboolean
black_monthlyboolean
black_yearlyboolean
goldboolean
gold_monthlyboolean
gold_yearlyboolean
billing_configuredboolean

False when billing is not enabled for the service.

effective_planstring,null

What the org is actually entitled to right now, after trial and Stripe subscription status are taken into account. An org with no live subscription or trial is personal. null means on hold: gated features refuse with subscription_required.

Possible values:
personalgoldblacknull
has_customerboolean
planstring

Stored plan on the row: personal, gold, black, or none while on hold.

seat_countinteger

Billable memberships, with the paid-subscription minimum of one. This is the quantity billed.

stripe_customer_idstring,null
stripe_price_idstring,null
stripe_subscription_idstring,null
stripe_subscription_statusstring,null
trial_activeboolean

The local trial before a subscription starts: Black for a new organization, Gold for a trial started before Black trials. A Stripe trialing subscription is not this flag.

trial_ends_atstring,null · date-time
unpaid_seat_chargesobject

Seat-change invoices not yet paid: how many, and the newest. An unpaid seat invoice never changes the plan or the members; it stays open and payable at pay_url. Read from what Elaichi recorded from Stripe's events, not from Stripe on each request.

countinteger
newestobject,null

The newest one the card holder can act on (failed, needs_approval, bank_approval), else the newest the bank is processing.

5 properties
amount_duenumber,null

Major units of currency.

currencystring,null

Lowercase ISO code.

pay_urlstring,null · uri

Stripe's hosted page for paying (or approving) the invoice. Null for bank_approval and awaiting_bank: paying there while the bank holds the charge could charge twice.

sincestring · date-time

When it first went unpaid.

statestring

failed: the card was declined; pay it at pay_url. needs_approval: the card wants the charge approved at pay_url. bank_approval: the bank holds the charge and asked the card holder to approve it in the bank's app or the message the bank sent; there is nothing to pay. awaiting_bank: the bank is still processing it, which can take about a day.

Possible values:
failedneeds_approvalbank_approvalawaiting_bank
curl -X GET 'https://api.elaichi.ai/organization/<id>/billing' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
const response = await fetch('https://api.elaichi.ai/organization/<id>/billing', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

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

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

response = requests.get(url, headers=headers)
print(response.json())