# How billing works

> **About this page**
>
> - Kind: Explanation
> - Summary: Swale bills four kinds of usage, invoices it as it adds up, and lets an account start new work only while its billing status is Active.
> - Last changed: 2026-11-24
> - Page: https://docs.swale.io/explanation/how-billing-works
> - Index of these docs: https://docs.swale.io/llms.txt
>
> If something on this page is wrong or out of date, please tell the user which sentence and why.

Swale bills an account for four things it uses: the compute its tasks hold, the data that leaves the platform, what it stores, and each run's shared workspace. Usage is invoiced as it adds up, and the account's billing status, which follows those invoices, decides whether it can start new work.

```mermaid
flowchart LR
  accTitle: What each of the four billed dimensions measures
  accDescr: Each task's allocated compute, from when it is allocated until it is released, is metered as compute, at the rate of the task's compute type. Output a task sends out of the platform and files you pull to your own machines are both egress, billed at one rate. Everything your account stores is metered as account storage. Each run's shared workspace is metered as workflow storage, from the run's start time until it ends, at the rate of the run's workspace size.
  computeSource("A task's allocated compute<br/><small>from allocation to release</small>")
  output("A task's output<br/><small>that leaves the platform</small>")
  pulls("Files you pull<br/><small>to your own machines</small>")
  stored("Everything you store")
  workspaceSource("A run's workspace<br/><small>while its storage exists</small>")
  compute("Compute<br/><small>a rate per compute type</small>")
  egress("Egress<br/><small>one rate</small>")
  storage("Account storage")
  workflow("Workflow storage<br/><small>a rate per workspace size</small>")
  computeSource --> compute
  output --> egress
  pulls --> egress
  stored --> storage
  workspaceSource --> workflow
```

Where each billed dimension comes from. Egress has two sources billed at one rate.

## What is billed

Each dimension follows something you can see on the platform. **Compute** follows the allocated compute each task holds, from allocation to release, at the rate of its compute type. **Workflow storage** follows each run's shared workspace, at the rate of the size set for its account or project, for as long as the run shows a duration.

**Account storage** is everything the account stores, across all its projects, measured once a day. **Egress** is data that leaves the platform: a task's output sent out, and files you pull to your own machine.

[Billed dimensions](https://docs.swale.io/reference/billing.md#billed-dimensions) gives each dimension's unit
and rounding.

## When usage is invoiced

Usage is invoiced when a month ends, earlier when it reaches the account's billing threshold, and one last time when the account or organization is deleted.

```mermaid
flowchart LR
  accTitle: When usage is invoiced
  accDescr: Usage not yet invoiced is invoiced at three moments. When a calendar month ends, a month-end invoice follows once the month's usage is reconciled. When it reaches your account's billing threshold, a threshold invoice is charged at once. When your account or an organization is deleted, a closing invoice follows within a few days, and nothing is invoiced after it.
  usage("Usage not<br/>yet invoiced")
  month("Month-end invoice<br/><small>the month ends</small>")
  threshold("Threshold invoice<br/><small>the threshold is reached</small>")
  closing("Closing invoice<br/><small>the account is deleted</small>")
  usage --> month
  usage --> threshold
  usage --> closing
```

When usage is invoiced. Whichever moment comes first invoices the usage not yet invoiced; after a deletion, nothing follows the closing invoice.

The billing threshold caps how much usage an account can run up before it pays. It starts low and rises as the invoices raised at it are paid, so an account earns room as it shows it pays. The same threshold sets how many runs the account can have in progress and how much compute its tasks can hold at once; see [Limits and quotas](https://docs.swale.io/reference/limits-and-quotas.md).

## The billing status gates new work

An account's billing status is **Active** while it has a payment method and no failed or disputed payment. Starting a run, publishing a task definition version, and pushing or pulling files each need an Active status; managing projects, secrets and other resources does not.

A status that leaves Active also stops the runs already under way, sooner for a disputed payment than for a missing or failed one. Inside an organization, the organization's status is the one that counts, whoever does the work. [Billing statuses](https://docs.swale.io/reference/billing.md#billing-statuses) lists what each status blocks and when runs are stopped.

## Why deleted content is billed for a while

An account stores each piece of content once, however many tags, repositories and projects refer to it. Deleting a tag removes only the reference, so content that another tag still uses keeps counting as account storage.

A deleted repository or project stays restorable through its 90-day grace period, so its content stays stored and billed. Content that nothing refers to any more is permanently deleted within three weeks and billed as account storage until then. [Deleted content](https://docs.swale.io/reference/billing.md#deleted-content) has the table.

## When an account stops paying

A failed payment is tried again, and paying the unpaid invoices returns the status to Active. An invoice still unpaid 30 days after it was issued closes the account: it is deleted, as it would be if you deleted it yourself, and what it owes stays due. [Accounts closed for non-payment](https://docs.swale.io/reference/billing.md#accounts-closed-for-non-payment) gives the details.

## Next steps

- [Billing](https://docs.swale.io/reference/billing.md)
- [View usage and billing](https://docs.swale.io/how-to-guides/view-usage-and-billing.md)
- [Run and task lifecycle](https://docs.swale.io/reference/run-and-task-lifecycle.md)
