# Billing and usage

Each [team](https://docs.qualithm.com/teams.md) has one plan. The plan sets how many events the team's devices can send each
month. It also sets the month's automation runs and how long the team's data stays. No plan limits
how many devices a team adds. On the free plan, at most 100 of
them can be connected at once. Paid plans set no limit on connected devices. Every team starts on
the free plan. The [pricing page](https://qualithm.com/pricing) lists each plan and its limits.

Your current team's **Settings** holds **Plan**, **Usage** and **Invoices**. Every member sees the
plan and usage. Only owners change the plan or see invoices.

## Read your usage

**Usage** shows how much of each limit the team has used:

- **Events**: readings devices published to `telemetry` this month. Capability declarations and
  command responses are free, and a publish on any other topic is refused, not counted.
- **Automations**: [automation](https://docs.qualithm.com/automations.md) runs this month.
- **Devices connected**: on the free plan, how many of the team's devices are connected now, out of
  the plan's limit.

`GET /v1/teams/{teamId}/usage` returns the same count as `connectedDevices`, with `connected` and
`limit`. It is `null` on a paid plan.

## Raise a monthly limit

Qualithm doesn't bill past a limit. Once the team has used the month's events, the gateway refuses
its devices' new readings. [MQTT](https://docs.qualithm.com/mqtt.md#publish-a-reading) says what a device sees. Once the team
has used the month's automation runs, each run shows **Plan limit reached** instead of running. Both
limits reset on the 1st, UTC.

Owners get one email the first time the team reaches each limit in a month. To raise a limit, an
owner moves the team to a plan that includes more.

## Connect more devices

On the free plan, once 100 of the team's devices are connected,
the gateway refuses each new connection. Devices already connected stay connected, including after a
move to the free plan. A reconnect counts as a new connection, so a device that drops can be refused
when it comes back. [MQTT](https://docs.qualithm.com/mqtt.md#when-the-gateway-refuses-a-connection) says what a device sees.

Owners get one email the first time the limit refuses a connection in a month, UTC. To connect more
devices, an owner moves the team to a paid plan.

The count is approximate. Devices that connect at the same moment through different gateways can
take the team past the limit. **Usage** can trail a connect or disconnect.

## Start a paid plan

Under **Plan management**, an owner on the free plan chooses **Upgrade to** a plan, then **Continue
to checkout**. Once the checkout page takes the payment, the app shows "Your subscription is now
active."

## Change plan

Under **Plan management**, an owner chooses **Upgrade to** or **Downgrade to** a plan. A review
opens below the plans. It lists how the limits change. It also shows what the change adds to or
credits on the next bill. Choose **Confirm plan change** to apply it.

A move to a plan that keeps data for less time doesn't delete the older data straight away. The team
keeps its previous plan's history for a grace period. The review says how long it lasts. After the
move, the app and an email to the owners name the date the grace period ends. Then Qualithm deletes
data older than the new plan's history window. To keep that data, move back to a plan with at least
as much history before that date.

## Pay and see invoices

Polar is the seller of every Qualithm subscription, so payments, receipts and invoices come from
Polar. Prices are in US dollars before tax. Polar adds any sales tax, VAT or GST that applies where
you live.

**Manage payment details** opens Polar's customer portal for the card and billing details.
**Invoices** lists each invoice with its date, amount and status.

## Cancel or get a refund

To cancel, an owner chooses **Downgrade to Free** under **Plan management**, then **Move to Free**.
The paid plan keeps working until the end of the period already paid for, then the team moves to
Free.

A plan or upgrade is refunded in full if you ask within 14 days of its first payment. Reply to the
Polar receipt or email support@qualithm.com. The [refund policy](https://qualithm.com/legal/refunds)
has the full terms.

## See also

- [Teams](https://docs.qualithm.com/teams.md)
- [Devices](https://docs.qualithm.com/devices.md)
- [Automations](https://docs.qualithm.com/automations.md)
