# Billing and add-ons

Source: https://help.ruuster.com/idx/account-billing

> Read your plan, billing status, next invoice date, each line of your subscription and your add-ons from your server.

```http
GET https://idx.ruuster.com/v1/account/billing
```

secret key only · free · never cached

Your account's billing as your invoice sees it: the plan, the billing status, when the next invoice
is issued, every line of the subscription (the plan, MLS boards, add-ons, and each MLS data access
fee as its own line) and the add-ons available to you.

## What to know

- **Secret key only,** from your server.
- It answers while your account is paused for an unpaid invoice, so your server can tell why other
  calls answer 402 `payment_required`.
- Amounts are integer cents and are your own account's. A price that is not set yet is `null`.
- `status` is `none` until your first payment goes through; the sandbox is free.
- A sandbox key answers a sample: no plan, every add-on on.
- [Billing and plans](https://help.ruuster.com/idx/billing-plans) and
  [Add-ons](https://help.ruuster.com/idx/add-ons).

## Query parameters

This call takes no query parameters.

## Response

The answer is `{ ok: true, data, meta }`. These are the fields of `data`; `meta` carries `brokerageId`, `freshness.asOf`, `mls` (each board's display rules) and `canonical`.

| Field | Type | Description |
|---|---|---|
| `plan` | string (enum) | Your plan (it also sets your rate limits; see /v1/usage). One of `starter`, `standard`, `pro`. |
| `status` | string (enum) | none: no plan yet (the sandbox is free; a live plan starts when you pay at go-live); trialing: reserved; no plan has a trial; active: paid up; past_due: a payment failed; the API keeps working until graceUntil; paused: the invoice is still unpaid after the grace period; website keys answer 402 payment_required until it is paid; canceled: the plan ended; live keys stop at accessEndsAt. One of `none`, `trialing`, `active`, `past_due`, `paused`, `canceled`. |
| `paymentMethod` | string (enum) | card = charged to the card on file; invoice = invoiced with payment terms. One of `card`, `invoice`. |
| `interval` | string (enum) | How often the plan bills. A subscription is all monthly or all yearly. One of `month`, `year`. |
| `billingStartedAt` | string or null | When billing started (ISO): the day your first payment went through and live keys could be issued. null before that. |
| `nextInvoiceAt` | string or null | When the next invoice is issued (ISO): the end of the current period. null when none is coming (no plan, or the plan is set to cancel). |
| `graceUntil` | string or null | past_due only: the API keeps working until then (ISO). null otherwise. |
| `cancelAtPeriodEnd` | boolean | true when the plan is set to cancel at the end of the paid period. |
| `accessEndsAt` | string or null | After a cancel: when your live keys stop (ISO). null otherwise. |
| `pricingModel` | string (enum) | flat = the plan covers boards.included MLS boards and each further approved board is its own line; per_board = the plan is charged once per approved board. One of `flat`, `per_board`. |
| `boards` | object | The MLS boards behind your bill. |
| `boards.billed` | integer | The approved MLS boards your subscription bills. A board counts once it is approved for at least one of your domains. |
| `boards.included` | integer or null | flat pricing: how many boards the plan covers. null with per_board pricing. |
| `lines` | array of object | Your subscription line by line: the plan, MLS boards, add-ons, and each MLS data access fee as its own line. |
| `lines[].kind` | string (enum) | plan = your plan; board = MLS boards beyond the ones your plan includes; addon = an add-on; fee = an MLS data access fee passed through at cost. One of `plan`, `board`, `addon`, `fee`. |
| `lines[].label` | string | The line as it reads on your invoice. |
| `lines[].quantity` | integer | How many: boards on a board line (or on the plan line when the plan is priced per board), otherwise 1. |
| `lines[].unitAmountCents` | integer or null | The price of one. Integer cents; null when the price is not set yet. |
| `lines[].amountCents` | integer or null | quantity times the unit price. Integer cents; null when the price is not set yet. |
| `lines[].currency` | string or null | Three-letter currency code, lowercase; null when the price is not set yet. |
| `lines[].interval` | string (enum) | How often the line is billed. one_time = charged once, on your next invoice. One of `month`, `year`, `one_time`. |
| `lines[].mlsId` | string or null | A fee line: the MLS board the fee is for. null on other lines. |
| `lines[].waived` | boolean | A fee line that is waived for your account: listed, not billed. |
| `addons` | array of object | The add-ons available to your account, on or off. |
| `addons[].key` | string | The add-on's key. |
| `addons[].name` | string | The add-on's name. |
| `addons[].enabled` | boolean | true while the add-on is on for your account. Its endpoints answer 403 addon_not_enabled otherwise. |
| `addons[].enabledAt` | string or null | When it was switched on (ISO); null when it never was. |
| `addons[].endsAt` | string or null | Set when it was switched off: it stays on until then (the end of the paid period). |
| `addons[].limits` | object or null | The add-on's limits for your account; null when it has none. |
| `addons[].limits.perMinute` | integer | Calls per minute. |
| `addons[].limits.perDay` | integer | Calls per America/Chicago day. |

## Errors

These are the error codes this endpoint can answer. Every error has the same body; [Errors](https://help.ruuster.com/idx/reference-errors) explains each code and what to show.

`invalid_parameter`, `secret_key_in_url`, `invalid_credentials`, `missing_credentials`, `access_revoked`, `brokerage_not_enabled`, `secret_key_in_browser`, `secret_key_required`, `internal_error`, `api_paused`, `source_unavailable`

## Example request

cURL:

```bash
curl -s "https://idx.ruuster.com/v1/account/billing" \
  -H "Authorization: Bearer $IDX_SECRET_KEY"
```

TypeScript:

```typescript
import { createClient } from "@ruuster/idx";

const idx = createClient({ secretKey: process.env.IDX_SECRET_KEY });

const r = await idx.request("/account/billing");
if (!r.ok) throw new Error(`${r.error.code}: ${r.error.message}`);
console.log(r.data);
```

Python:

```python
import os

import requests

res = requests.get(
    "https://idx.ruuster.com/v1/account/billing",
    headers={"Authorization": "Bearer " + os.environ["IDX_SECRET_KEY"]},
    timeout=30,
)
body = res.json()
if not body["ok"]:
    raise RuntimeError(body["error"]["code"] + ": " + body["error"]["message"])
print(body["data"])
```

PHP:

```php
<?php

$ch = curl_init('https://idx.ruuster.com/v1/account/billing');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('IDX_SECRET_KEY')],
    CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$body['ok']) {
    throw new RuntimeException($body['error']['code'] . ': ' . $body['error']['message']);
}
print_r($body['data']);
```

## Example response

```json
{
  "ok": true,
  "data": {
    "plan": "starter",
    "status": "active",
    "paymentMethod": "card",
    "interval": "month",
    "billingStartedAt": "2026-10-01T15:00:00.000Z",
    "nextInvoiceAt": "2026-11-01T15:00:00.000Z",
    "graceUntil": null,
    "cancelAtPeriodEnd": false,
    "accessEndsAt": null,
    "pricingModel": "flat",
    "boards": {
      "billed": 2,
      "included": 1
    },
    "lines": [
      {
        "kind": "plan",
        "label": "Ruuster Listings API, 1 MLS included",
        "quantity": 1,
        "unitAmountCents": 10000,
        "amountCents": 10000,
        "currency": "usd",
        "interval": "month",
        "mlsId": null,
        "waived": false
      },
      {
        "kind": "board",
        "label": "Additional MLS: Fixture MLS",
        "quantity": 1,
        "unitAmountCents": 1500,
        "amountCents": 1500,
        "currency": "usd",
        "interval": "month",
        "mlsId": null,
        "waived": false
      },
      {
        "kind": "addon",
        "label": "Public Records",
        "quantity": 1,
        "unitAmountCents": 7000,
        "amountCents": 7000,
        "currency": "usd",
        "interval": "month",
        "mlsId": null,
        "waived": false
      },
      {
        "kind": "fee",
        "label": "Fixture MLS data access fee",
        "quantity": 1,
        "unitAmountCents": 4500,
        "amountCents": 4500,
        "currency": "usd",
        "interval": "month",
        "mlsId": "aaaaaaaa-0000-4000-8000-000000000001",
        "waived": false
      }
    ],
    "addons": [
      {
        "key": "public_records",
        "name": "Public Records",
        "enabled": true,
        "enabledAt": "2026-10-02T15:00:00.000Z",
        "endsAt": null,
        "limits": {
          "perMinute": 20,
          "perDay": 500
        }
      }
    ]
  },
  "meta": {
    "brokerageId": "bbbbbbbb-0000-4000-8000-000000000001",
    "freshness": {
      "asOf": "2026-10-22T15:00:00.000Z"
    },
    "mls": [],
    "canonical": null,
    "audience": "display"
  }
}
```
