# Billing status

> Source: https://elaichi.ai/docs/api-reference/organizations/organization/getorganizationbilling/

`GET /organization/{id}/billing`

Resource: **Organization** · API: **Organizations**

## Path parameters

- **`id`** _(string, required)_
  Organization id (`org_…`).

## Response body

- **`plan`** _(string)_
  Stored plan on the row: `gold`, `black`, or `none` once locked.
- **`effective_plan`** _(string,null)_
  What the org is actually entitled to right now, after trial and Stripe subscription status are taken into account. `null` means locked — gated features refuse with `subscription_required`.
  Allowed: `gold`, `black`, `null`
- **`trial_ends_at`** _(string,null)_
- **`trial_active`** _(boolean)_
  The local pre-Checkout Gold trial only. A Stripe `trialing` subscription is not this flag.
- **`stripe_customer_id`** _(string,null)_
- **`stripe_subscription_id`** _(string,null)_
- **`stripe_subscription_status`** _(string,null)_
- **`stripe_price_id`** _(string,null)_
- **`has_customer`** _(boolean)_
- **`billing_configured`** _(boolean)_
  False when this deployment has no Stripe key configured.
- **`seat_count`** _(integer)_
  Billable memberships, with the paid-subscription minimum of one. This is the Checkout quantity.
- **`available_plans`** _(object)_
  Which prices this deployment has configured.
  - **`gold`** _(boolean)_
  - **`gold_monthly`** _(boolean)_
  - **`gold_yearly`** _(boolean)_
  - **`black`** _(boolean)_
- **`pricing`** _(object, required)_
  What this org's next Gold checkout charges: its sticky tier from its first checkout if it has one, otherwise the tier for the country the request comes from.
  - **`country`** _(string,null)_
    ISO 3166-1 alpha-2 the price is based on, or null when unknown (which prices as list).
  - **`tier`** _(string)_
    Tier id: `t0` (list) to `t4` by GDP band, or a country tier such as `in` (India). Compare by `discount_pct`.
  - **`discount_pct`** _(integer)_
    Discount off list, 0–60.
  - **`regional`** _(boolean)_
    `tier !== "t0"`.
  - **`available`** _(boolean)_
    False only for a country Elaichi cannot sell to — Checkout refuses it with `region_unavailable`.
  - **`currency`** _(string)_
    Lowercase ISO 4217 the `gold` amounts are in.
  - **`gold`** _(object)_
    Per-seat price for one cycle in `currency` minor units — exactly what Checkout charges. `year` is the year total.
    - **`month`** _(object)_
      - **`unit_amount`** _(integer)_
    - **`year`** _(object)_
      - **`unit_amount`** _(integer)_
  - **`list`** _(object)_
    List (t0) price to show the discount against: in `currency` when list price is set in it, else USD. Display only.
    - **`currency`** _(string)_
    - **`gold`** _(object)_
      - **`month`** _(object)_
      - **`year`** _(object)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/organization/<id>/billing' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
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);
```

### Python

```python
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())
```
