# Get billing account

`GET /v1/organizations/{organization}/billingAccount`, operation `billingAccounts.GetBillingAccount`

Gets an organization's billing account: the plan it is on, which sets its quotas, its credits, and its free allowances.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `organization` | path | Yes | `string` | The organization's ID. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowances` | `Allowance[]` | Yes | This calendar month's (UTC) free allowances on the plan, and how much of each is used. |
| `autoReload` | `AutoReload` | Yes | Buying credits automatically, with the card a purchase saved, when the balance runs low. |
| `autoReload.amount` | `Money` | Yes | What each reload buys. |
| `autoReload.below` | `Money` | Yes | The balance below which it reloads. |
| `autoReload.card` | `string` | Yes | The saved card that pays, such as Visa •••• 4242; empty without one. |
| `autoReload.enabled` | `boolean` | Yes | Whether it reloads. Turning it on needs a saved card. |
| `autoReload.failure` | `string` | Yes | Why the last reload failed, if that turned it off. |
| `autoReload.monthlyMax` | `Money` | Yes | The most it buys in a calendar month (UTC). |
| `balance` | `Money` | Yes | The credits left: those granted that have not expired, less what usage has cost, this month's so far included. Below zero when usage ran past them while billing was enforced; the next credits pay that first. Until it is, usage past the credits is not charged, and the balance stops at zero. |
| `balance.currencyCode` | `string` | Yes | The currency, as its three-letter ISO 4217 code, such as USD. |
| `balance.nanos` | `integer (int32)` | Yes | The billionths of a unit of the amount, such as 500000000 of US$1.50. |
| `balance.units` | `integer (int64)` | Yes | The whole units of the amount, such as 1 of US$1.50. |
| `billedBy` | `string` | Yes | Who bills the plan: NONE on Hobby; KOSEM, kosem's team, outside kosem, on a plan its staff set; or STRIPE, a subscription the organization started. Values: `NONE`, `KOSEM`, `STRIPE`. |
| `enforced` | `boolean` | Yes | Whether billed requests without credits are refused. Until billing enforces them, it only counts them. |
| `freeViewers` | `integer (int64)` | Yes | Active members and guests holding only read-only, billing, audit or member-admin roles (or no role), who are free on Team. |
| `monthCharges` | `Money` | Yes | What this calendar month's (UTC) usage costs so far, every charge counted, whichever credits pay for it, as Usage shows it: what a usage limit is set against. |
| `monthCharges.currencyCode` | `string` | Yes | The currency, as its three-letter ISO 4217 code, such as USD. |
| `monthCharges.nanos` | `integer (int32)` | Yes | The billionths of a unit of the amount, such as 500000000 of US$1.50. |
| `monthCharges.units` | `integer (int64)` | Yes | The whole units of the amount, such as 1 of US$1.50. |
| `monthlyCredits` | `boolean` | Yes | Whether kosem gives the organization committed credits each month, on the 1st (UTC), on Enterprise. |
| `name` | `string` | Yes | Resource name, organizations/{organization_id}/billingAccount. |
| `plan` | `string` | Yes | The plan the organization is on: HOBBY, $0 a month plus usage; PRO, $15 a month flat for one engineer plus usage; TEAM, $30 a builder a month plus usage; or ENTERPRISE, on terms agreed with kosem. Values: `HOBBY`, `PRO`, `TEAM`, `ENTERPRISE`. |
| `purchasesEnabled` | `boolean` | Yes | Whether this organization can buy credits through Stripe. |
| `seats` | `integer (int64)` | Yes | Billable builder seats on Team (members or guests holding a builder role), at least one. |
| `subscription` | `Subscription` | No | The Stripe subscription that pays for Pro or Team, if the organization started one. |
| `subscription.cancelAtPeriodEnd` | `boolean` | Yes | Whether the subscription ends as the paid month ends. |
| `subscription.card` | `string` | Yes | The card that pays it, such as Visa ending in 4242. |
| `subscription.currentPeriodEnd` | `string (date-time)` | Yes | When the paid month ends, and it renews, or with cancelAtPeriodEnd, ends. |
| `subscription.currentPeriodStart` | `string (date-time)` | Yes | When the paid month began. |
| `subscription.plan` | `string` | Yes | The plan the subscription pays for: PRO or TEAM. Values: `PRO`, `TEAM`. |
| `subscription.seats` | `integer (int64)` | Yes | The quantity it bills for each month, counted as each month starts: 1 on Pro, or the organization's builders on Team. |
| `subscription.state` | `string` | Yes | STARTING until its first invoice is paid; ACTIVE; PAST_DUE while Stripe retries a renewal; ENDED once canceled or given up on, when the organization returns to Hobby. Values: `STARTING`, `ACTIVE`, `PAST_DUE`, `ENDED`. |
| `subscriptionsEnabled` | `boolean` | Yes | Whether the organization can start a subscription itself, by card, through Stripe. |
| `suspended` | `boolean` | Yes | Whether the account is suspended, as when one of its payments was disputed, until kosem's staff unsuspend it. Suspended, it buys no credits, by purchase or auto-reload, and once billing is enforced, its billed requests are refused. |
| `terms` | `Terms` | No | On Enterprise, the terms agreed with kosem that it is on. |
| `terms.discountPercent` | `integer (int32)` | Yes | What comes off every price, in percent. |
| `terms.endTime` | `string (date-time)` | No | When the contract ends; unset for none. Nothing changes by itself then. |
| `terms.monthlyCredits` | `Money` | Yes | The credits kosem gives the organization each month, on the 1st (UTC), which don't carry over. |
| `terms.version` | `integer (int32)` | Yes | Which terms these are, from 1; each change is the next, and charges name the version that priced them. |
| `updateTime` | `string (date-time)` | No | When the plan last changed; unset if it never did. |
| `usageLimit` | `UsageLimit` | No | The most the organization lets its usage cost in a calendar month (UTC), which its owners set; unset without one. |
| `usageLimit.amount` | `Money` | Yes | The most this month's charges may come to. |
| `usageLimit.stop` | `boolean` | Yes | Whether kosem stops billed work once this month's charges reach it, refusing it with resource_exhausted and the reason USAGE_LIMIT_REACHED and stopping running environments, until the month ends or it's raised; without, it only shows. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.