# States

URL: /business/states · Id: `page:business/states`

> Where each record stands in its lifecycle, the Verbs and Events that move it, and the states a Startup moves through from idea to scale.

A state is where one record stands: an [Order](/business/nouns/order) is `placed`, `paid` or `refunded`. Only a [Verb](/business/nouns/verb) or an [Event](/business/nouns/event) moves it, and every move is on record.

## The Startup's states
A [Startup](/business/nouns/startup) moves through the states of its [Lifecycle](/business/nouns/lifecycle), and each move runs the entry checks of the next state. [Startup.advance](/business/nouns/startup/advance) makes the move and names each check that fails.

## How a record moves
Each state lists its ways out. Most are Verbs someone calls, as [`Order.pay`](/business/nouns/order/pay) moves an Order from `placed` to `paid`.

The rest are Events with no caller, from the payment rail, the clock or the runtime. When an [Invoice](/business/nouns/invoice) goes overdue, `Invoice.overdue` moves its [Subscription](/business/nouns/subscription) to `pastDue` and nobody calls anything.

Three rules hold for every record:

- `update` never moves a state. A record changes state only through the Verb or Event its lifecycle names.
- A record's `actions` list only the Verbs that move it from where it stands, so an agent that follows them never calls a refused Verb.
- A terminal state is final. A refunded Order stays refunded, and a new purchase is a new Order.

Some states are computed, never set. A [Customer](/business/nouns/customer) turns `atRisk` when a renewal goes past due or a charge is disputed, and turns back once the Invoice is paid. No Verb takes a computed state as an input.

Every move emits an Event whose `data` holds the record as the move left it and `previous` holds the state it left. A [Trigger](/business/nouns/trigger) can wake a [Workflow](/business/nouns/workflow) on that Event, or on a record entering a state.

## Read one lifecycle
Each [Noun](/business/nouns/noun) page draws its lifecycle and lists it as a table. The Order's reads like this:

| State | Meaning | Moves to |
| --- | --- | --- |
| `placed` (first) | The Customer committed, with the Offer Version and price fixed; nothing is charged yet. | `paid` by [Order.pay](/business/nouns/order/pay); `canceled` by [Order.cancel](/business/nouns/order/cancel) |
| `paid` | Its amount is settled and its Entries posted; a Service Order’s work runs in `fulfillment`. | `fulfilled` by [Order.fulfill](/business/nouns/order/fulfill); `closed` by [Order.confirm](/business/nouns/order/confirm); `canceled` by [Order.cancel](/business/nouns/order/cancel); `refunded` by [Order.refund](/business/nouns/order/refund) |
| `fulfilled` | What it bought is granted: Entitlements for software and data, or a shipment for goods. | `closed` by [Order.confirm](/business/nouns/order/confirm); `refunded` by [Order.refund](/business/nouns/order/refund) |
| `closed` | The Customer signed off, which earns the Startup its fee. | `refunded` by [Order.refund](/business/nouns/order/refund) |
| `canceled` | Ended before fulfillment, with any payment returned in full. | None: it ends here. |
| `refunded` | Its payment returned in full, with the reversing Entries posted; a partial refund keeps its state. | None: it ends here. |

## Every record with states
These records carry a closed set of states, listed from the first. Each name opens its page, which draws the moves where its Noun has a lifecycle.

## Your own states
A Noun the Startup adds gets a lifecycle the same way. Its `status` values are the states and its Verbs are the moves, and [Nouns](/code/file-conventions/nouns) shows the file that declares both. Records of that Noun then show their state on every [Interface](/business/nouns/interface) and emit an Event on every move.