# Pricing, usage and billing

## What it costs

Every organization is on a plan. A plan's monthly price covers that much usage; what's used beyond it is billed on top, at the prices below.

| | **Hobby** | **Business** |
|---|---|---|
| **A month** | $5, covering $5 of usage | $50, covering $50 of usage |
| **Sizes** | up to 2xl: 8 cores, 8 GB | up to 5xl: 32 cores, 64 GB |
| **Instances of a service** | up to 3 | up to 10 |
| **A volume, at most** | 100 GB | 4 TB |
| **Support** | by email, as soon as we can | priority: an answer within one business day |
| **Private servers** | — | yes, at their own monthly price |

Choose it under **Billing → Plans**; it applies to the month you're in. Moving to Hobby needs your services within Hobby's limits (the page says which aren't). Need more than Business? [Talk to us](/contact).

Usage is counted in four numbers:

| | |
|---|---|
| **$6 per GB of memory, a month awake** | A service's size (its memory, and the cores that come with it), billed by the hour it's awake. Asleep costs nothing. |
| **$0.10 per GB of a volume, per month** | A [volume](/docs/volumes)'s size, full or not, whether its service is awake, asleep or stopped. |
| **$0.10 per GB stored, per month** | Snapshots, buckets and static sites, by what they hold. |
| **First $5 free, then your plan** | Once your free $5 is used up, your plan is charged every month: Hobby's $5 covers your first $5 of usage, Business's $50 the first $50. |

Requests, data transfer, builds, custom domains and team members aren't charged. Prices are in US dollars, with no VAT on top.

### Sizes

Every service runs at a size: its memory and the cores that come with it. It's what the service may use, what its server keeps for it, and what it's billed for each hour it's awake.

| Size | Cores | Memory | A month awake | An hour |
|---|---|---|---|---|
| **xs** | ¼ | 256 MB | $1.50 | $0.0021 |
| **s** | ½ | 512 MB | $3 | $0.0041 |
| **m** | 1 | 1 GB | $6 | $0.0082 |
| **l** | 2 | 2 GB | $12 | $0.0164 |
| **xl** | 4 | 4 GB | $24 | $0.0329 |
| **2xl** | 8 | 8 GB | $48 | $0.0658 |
| **3xl** | 16 | 16 GB | $96 | $0.1315 |
| **4xl** | 32 | 32 GB | $192 | $0.263 |
| **5xl** | 32 | 64 GB | $384 | $0.526 |

Hobby runs up to 2xl, Business up to 5xl. An app gets **s** unless it says; a [database](/docs/databases) its engine's (xs for Postgres and Redis, m for MySQL and MongoDB); a [computer](/docs/computers) m.

Change it under **Scaling** (or with `size` in [alf.toml](/docs/alf-toml), or the API): it takes effect at once, on the containers as they run, with **no restart**. Smaller works the same way; whatever in it uses more memory than the new size by then is stopped and started again. A size bigger than the servers it runs on can hold is refused, and the service keeps the size it had: one container can have up to 80% of its server's memory, and no more cores than it has.

What a month comes to: an app that sleeps is billed only while it's awake, so an **s** website awake three hours a day costs about 37 cents a month. A database never sleeps, so it costs its size all month: $1.50 for an xs Postgres. On Hobby, an s app awake all month, an xs Postgres and 2 GB of disk come to $4.70, within the $5 the plan covers.

Each container counts on its own: a service on two servers, or one that scaled out to three containers under load, is billed two or three times its size for that time. Its server counts each container's time every 15 seconds, from when it starts until it has finished its last requests, so one added for twenty seconds is billed for those twenty seconds. A container that goes over its memory is stopped by the server and started again, so a size that's too small shows as restarts (and as a warning on the service). At its cores it runs slower instead.

**Disk speed** isn't limited or charged, whatever the size: a service reads and writes as fast as the server's disk does.

### Volumes and storage

A [volume](/docs/volumes) is billed by its size, whether it holds anything or not: 10 GB is $1 a month. Change its size under the service's **Volumes**: bigger, or smaller down to what it holds.

Everything else that's kept is billed by what it holds. A gigabyte kept for a whole month is one GB-month, counted once an hour: 10 GB kept for three days is about 1 GB-month, so $0.10. That's the [snapshots](/docs/backups) kept beside volumes, snapshots' copies off the server, what your [buckets](/docs/buckets) hold, and [static sites'](/docs/static-sites) files. The code you pushed isn't charged.

### Servers of your own

A [private server](/docs/servers#private-servers) has a flat monthly price, agreed with Alf. What runs on it isn't metered: no compute and no storage charges for it.

## Your free $5, and after

After signing up, you add a payment method: it comes before anything is created or deployed (without one the API answers `402` with the code `payment_required`). It's entered on our payment provider's page, and adding it charges nothing.

Then every organization starts with $5 of free usage, with no time limit. **Billing** shows how much is left.

When it's used up, nothing changes for what runs: your plan applies. From the following month, your plan's price is charged every month ($5 on Hobby, $50 on Business), whether you use anything or not, and it covers that much usage; beyond it you pay what you used. To stop paying, delete the organization: its last invoice is for the month you delete it in, up to then, plan included, and it's made a week later, when the organization is deleted for good ([Deleting an organization](/docs/members#deleting-an-organization)).

## The Billing page

Three figures at the top:

- **Your plan**: Hobby or Business, what it costs and covers, and how much of your free $5 is left while it lasts.
- **If the month ended today**: what you'd be charged right now, for what's been used so far.
- **Estimate for the whole month**: where the month is heading if things stay as they are.

Below them, the month service by service: each one's size, the hours it was awake, what it cost so far and what the whole month comes to; then volumes, storage, any server of your own, and the sum with what your plan covers and your free credit. Then the two plans side by side, to move between.

The estimate is made like this: a service that never sleeps is awake to the end of the month, and one that sleeps is awake as much as over its last full days (up to seven), each at its size now; volumes keep their size, and what's stored now stays stored. It's a guess: a new size, a busy week or a quiet one changes it.

## Billing

- A month is invoiced the night after it ends and charged to your payment method. **Billing** lists the invoices, each with a link to view or pay it.
- The payment method is entered on our payment provider's page (Stripe); Alf never sees the card.
- If a charge fails, the invoice stays open with its link. Until it's settled nothing new can be created or deployed; what runs keeps running. If it stays unpaid, Alf may pause the organization's apps: visitors then get a "paused" page, and nothing is deleted.
- While billing hasn't started on Alf, **Billing** says so and shows what the month would cost.

## Usage

**Billing → Usage** shows, per month:

- **Compute**: what services cost for the time they were awake, in total and per service: a size's memory × the hours awake (the cores come with the size). Invoices count it in GB-hours of memory, which is memory, not disk. **Container hours** beside it is the time alone.
- Requests, data in and out, wake-ups and server errors.
- Charts per day, and a table per service (deleted services stay in the history).
- **Storage**: volumes by their size, and what snapshots, buckets and static sites hold now, with the GB-months over the month.

Days are in UTC; figures are brought up to date every 15 minutes. The same figures are in the API: `GET /organizations/{id}/usage`, `GET /organizations/{id}/billing` and the price list at `GET /pricing`.

## A limit on the month

Set one under **Billing**. Once the month reaches it, nothing new can be created or deployed and
`standing` becomes `capped` — but **what's already running keeps running**. Turning someone's apps
off over money they agreed to spend isn't a decision to make automatically.

Worth setting wherever a coding agent can deploy. An agent can make a service bigger, scale it
out, hold a session container open, or get into a loop; the limit is what lets you hand one
the keys without handing it the chequebook. You're told once when a month reaches it, if you have
a notification channel for it.

The limit can't be lower than your plan's monthly price. What counts towards it is what you use, so a limit at exactly that price is reached once your usage gets there.
