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

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Project billing

> Review invoices and manage a project's plans and subscriptions.

`photon project billing` covers what a project is subscribed to and what it has
been charged. For the card on file, see
[the organization payment method](/docs/beta/cli/organizations/billing).

[Browse the automatic command reference](/docs/beta/cli/reference/index).

## Review current billing

```sh theme={null}
photon project billing overview
photon project billing invoice list
```

`overview` shows subscriptions, every entitlement with its version, and
current-period usage. Invoices are issued to the project's organization, so
`invoice list` shows the organization's invoices.

<Note>
  The API returns amounts in cents. Human output displays them as decimal
  currency units, so `100` cents appears as `1.00`. JSON keeps the original
  integer `amountCents` and `totalCents` values, so scripts should read those.
</Note>

## Purchase a plan

Categories use the API's lowercase format. Plan codes are trimmed and may
contain any non-control text up to 64 characters.

```sh theme={null}
photon project billing plan purchase \
  --category messaging \
  --plan-code pro-monthly \
  --force
```

Purchase polls `PENDING` and `RUNNING` snapshots until Photon returns a
terminal result or you press <kbd>Ctrl-C</kbd>. A terminal failure is reported
on stderr and exits `1`, and leaves no recovery-queue entry — fix the cause and
purchase again with a **fresh** idempotency key.

Check a long-running purchase by its operation ID:

```sh theme={null}
photon project billing operation view pho_bop_...
```

Billing operation IDs always start with `pho_bop_`.

## Cancel and resume a subscription

```sh theme={null}
photon project billing subscription cancel --category messaging --force
photon project billing subscription resume --category messaging
```

<Warning>
  The API's response is authoritative. If it returns
  `cancellationScheduled: false` or `resumed: false`, the CLI reports that
  nothing changed rather than claiming success — check the category and the
  current subscription state.
</Warning>

<Accordion title="API routes used by these commands">
  | Command | Method and route |
  | - | - |
  | `billing overview` | `GET /v1/projects/{projectId}/billing` |
  | `billing invoice list` | `GET /v1/organizations/{organizationId}/billing/invoices` |
  | `billing operation view` | `GET /v1/projects/{projectId}/billing/operations/{operationId}` |
  | `billing plan purchase` | `POST /v1/organizations/{organizationId}/billing/projects/{projectId}/purchase` |
  | `billing subscription cancel` | `POST /v1/organizations/{organizationId}/billing/projects/{projectId}/cancel` |
  | `billing subscription resume` | `POST /v1/organizations/{organizationId}/billing/projects/{projectId}/resume` |

  The organization routes use the project's own organization, read with
  `GET /v1/projects/{projectId}`, not the selected organization.
</Accordion>


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