> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routa.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Plans and allowance

> How the message allowance of your plan works, what happens when it runs out and how to turn on overage.

Each organization has a **plan**, and each plan includes a message **allowance** per billing period, plus limits on projects and on channels per project. Plan prices and terms are on the [Routa website](https://routa.chat). You subscribe and manage the subscription in the dashboard.

> [!NOTE]
>
> The billing endpoints (`/v1/billing`) belong to the dashboard and use a user session. An API key does not buy or change plans.

## How the allowance is counted

* The allowance applies to the **billing period** of your subscription, not to the calendar month. It renews along with the invoice.
* Each message you send **reserves one unit** of the allowance at accept time, in the same transaction that stores the message.
* If the message fails, the unit is **returned**.
* An idempotent repeat (same `Idempotency-Key`) **consumes nothing**.
* **Inbound** messages are never counted or blocked, because refusing an inbound message would lose your customer's data.
* [Test projects](https://docs.routa.chat/en/environments.md) are neither counted nor blocked.
* Messages the business sends from the WhatsApp Business app, on a channel connected in coexistence mode, **use none of your allowance**. They have `origin: "business_app"`. See [Messages sent from the WhatsApp Business app](https://docs.routa.chat/en/concepts/messages.md#messages-sent-from-the-whatsapp-business-app).

## Free messages

An organization that never subscribed to a plan can send **10 free messages**, once, from live projects. This allowance does not renew and ends when a subscription in good standing starts. The messages you already used do not count against the plan. After the 10, `POST /v1/messages` responds `402` with the `free_messages_exhausted` code, and `details.limit` and `details.used` show the consumption.

## When the allowance runs out

When you reach the limit, **sending stops** and `POST /v1/messages` responds `402 Payment Required`:

```json theme={null}
{
  "error": {
    "type": "billing_error",
    "code": "message_quota_exceeded",
    "message": "This billing period's allowance of 2000 messages is used up. It resets at 2026-10-31T00:00:00.000Z; upgrade the plan to keep sending.",
    "details": {
      "limit": 2000,
      "used": 2000,
      "resets_at": "2026-10-31T00:00:00.000Z"
    },
    "request_id": "req_01J8..."
  }
}
```

Use `details.resets_at` to know when the allowance renews, and `details.limit` and `details.used` to show the consumption. Your options to keep sending:

> [card] Wait for the renewal
>
> The allowance comes back at the start of the next period.

> [card] Change plans
>
> A larger plan has more messages. The billing period stays the same, and what you already used still counts. See [Change plans](#change-plans).

> [card] Turn on overage
>
> Pay for messages beyond the allowance, up to a cap you set.

> [!WARNING]
>
> Do not schedule automatic retries for `402`. Waiting does not increase the allowance. Treat the error as a business alert, queue the send on your side and resume once the allowance is restored.

## Change plans

You change plans in the billing portal, opened from the dashboard. Plan prices and names are on the [Routa website](https://routa.chat).

* **Upgrade:** charged right away. The billing period stays the same, and the messages you already used in this period keep counting against the new allowance.
* **Downgrade:** only takes effect at the end of the billing period. Until then, the current plan and allowance still apply.
* **Retention:** a plan with a shorter history shortens the [message content retention](https://docs.routa.chat/en/reliability/delivery-guarantees.md#message-content-retention). Once the downgrade takes effect, Routa removes the content older than the new period, with no grace period. The removal is permanent.

## Overage (optional)

Overage lets you keep sending beyond the allowance, up to a **cap in number of messages** that you set.

* It is **opt-in**: nothing extra is charged unless you turn it on.
* It requires a subscription in good standing paid by **card**. A subscription paid with Pix, a trial, a past-due payment and a plan that does not sell overage cannot use it.
* It is charged **once, after the period closes**: the messages beyond the allowance appear as a line item on the next invoice. Sending never calls the payment provider.
* The most you can pay per period is limited by the cap you chose.

You turn it on, turn it off and adjust the cap in the dashboard.

## Past-due payment

If the payment fails and the subscription becomes `past_due`, you are not blocked right away. There is a grace period that ends at whichever comes first:

* **3 days**; or
* **10% of the plan allowance** in messages accepted since then.

After that, sends return `402` with the `payment_failed` code. Update the payment method in the dashboard to send again.

A subscription paid with **Pix** is prepaid. If the period ends without a renewal, the same grace of 3 days or 10% of the allowance applies, counted from the end of the period. After it, sends also return `payment_failed`.

## When a send is refused because of the subscription

Besides `message_quota_exceeded`, `free_messages_exhausted` and `payment_failed`, the subscription can refuse a send with `402 subscription_required`:

* The subscription was canceled or was never paid.
* The subscription was set to cancel at the end of the period, and the period ended.
* The billing period of the subscription has not opened yet. This is short-lived: try again in a moment.

During a **trial**, the allowance is capped at that of the most basic plan, even if you chose a larger one. See the numbers on the [Routa website](https://routa.chat).

## Plan limits

Besides the allowance, the plan limits the number of projects in the organization and the number of channels **per project**. When you exceed them, the dashboard refuses the creation with `project_limit_exceeded` or `channel_limit_exceeded`, with `details.limit` giving the maximum.

## Monitor consumption

Check how much you used with [`GET /v1/usage`](https://docs.routa.chat/en/billing/usage) and follow the allowance in the dashboard. Set internal alerts before the allowance runs out, instead of finding out through the `402`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.