# Billing and plans

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

> How billing works for the Ruuster Listings API. The sandbox is free, you pay when you go live, what is on your invoice, what happens when a payment fails, and how to cancel.

The sandbox is free for as long as you build. Billing starts when you go live. Your plan's price,
and the price of everything else on this page, is shown in your console before you pay and on every
invoice. This page explains how billing works, not what it costs.

## When billing starts

1. **Sandbox.** Free. You build on sample listings with sandbox keys and need no card.
2. **Go-live request.** You ask for live MLS data. Ruuster and each MLS board review your website.
3. **Pay.** When your request is approved, your console shows your first invoice in full and asks for
   a card. Brokerages already on the Ruuster Platform can be invoiced instead. Email
   `helpme@ruuster.com` to ask.
4. **Live keys.** Billing starts the day your first payment goes through. That same day you can create
   your live keys. Nothing is charged at approval, and there is no trial period.

You see the whole first invoice before you pay: the Ruuster Listings API plan, your MLS boards, any
MLS data access fees, any add-ons, sales tax and the total.

## What is on your invoice

| Line | What it is |
|---|---|
| Ruuster Listings API | The base plan, with 1 MLS included. The line reads "Ruuster Listings API, 1 MLS included". |
| Additional MLS | Each approved board beyond the one your plan includes. The line names the board, for example "Additional MLS: Georgia MLS". |
| MLS data access fees | Some MLSs charge a fee for access to their data. Ruuster passes that fee through at cost, as its own line named after the MLS, so you can see exactly what the board charges. Most boards have none. |
| Add-ons | Each [add-on](https://help.ruuster.com/idx/add-ons) you switched on. |
| Sales tax | Worked out from your billing address, where it applies. |

**You pay for approved boards only.** Each MLS board approves your website separately. A board is
added to your bill when it approves you, and removed when an approval ends. Picking a board on your
go-live request does not bill you for it.

**Changes mid-period are prorated.** When a board is approved, or you add an add-on, part way through
a billing period, the next invoice carries the part of the period that was left. When a board's
approval ends, the unused part is credited the same way.

## Monthly or annual

You choose monthly or annual billing when you pay. A subscription is all monthly or all annual: the
plan, boards and add-ons bill on the same schedule. When annual billing is available for your plan,
your console shows what it saves. To change the schedule after you start, write to support.

## Who can open Billing

The account owner, admins and members with the Billing role. Only the owner can cancel the plan.
[Your account console](https://help.ruuster.com/idx/guide-console) lists every role.

## If a payment fails

- **Your API keeps working for 7 days.** We email you, and your console shows the date. Update the
  card or pay the invoice before then and nothing on your site changes.
- **After 7 days the API pauses for your website.** Calls with your website keys answer
  402 `payment_required`. Nothing is deleted: your keys, domains and settings are kept.
- **Paying the invoice lifts the pause within a minute.**

While paused, two endpoints still answer with your secret key, so your server can see why:
[`GET /v1/account/billing`](https://help.ruuster.com/idx/account-billing) and
[`GET /v1/usage`](https://help.ruuster.com/idx/usage).

In your code, treat 402 `payment_required` like an outage you cannot retry out of: keep serving
cached pages, and do not retry in a loop. [Errors and what to show](https://help.ruuster.com/idx/errors)
has the wording.

## Check your billing from code

`GET /v1/account/billing` returns your plan, billing status, next invoice date, each line of your
subscription and your add-ons. Secret key only, from your server.

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

| `status` | What it means |
|---|---|
| `none` | No plan yet. You are in the sandbox, or approved and not paid yet. |
| `active` | Paid up. |
| `past_due` | A payment failed. The API keeps working until `graceUntil`. |
| `paused` | The invoice is still unpaid. Website keys answer 402 `payment_required`. |
| `canceled` | The plan ended. Live keys stop at `accessEndsAt`. |

Amounts in the answer are in cents and are your own account's. A line whose price has not been set
yet has `null` amounts.

## Cancel

Cancel any time from Billing in your console. Your plan runs to the end of the period you paid for,
then your live keys stop working. You can undo the cancellation any time before that date. Your
sandbox keys keep working after you cancel.

## Questions

Write to helpme@ruuster.com, or call 312-948-5402, with your brokerage's name. For a question about one invoice, include
the invoice date.
