> ## 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.

# Billing

> View plans, manage subscriptions, and open Stripe portals from the CLI

The `photon billing` commands let you view available plans, check your current subscription, start a checkout, and manage billing through the Stripe Customer Portal.

All billing commands require an active project. Set `$PHOTON_PROJECT_ID` or pass `--project <id>`.

## List available plans

```sh theme={null}
photon billing plans
```

Shows all plans and their Stripe price IDs. Use the price ID with `checkout` to subscribe.

## View current subscription

```sh theme={null}
photon billing show
photon billing show --json
```

Displays the active subscription for the current project, including plan details and status.

## Start a checkout

```sh theme={null}
# Interactive picker — recommended for first-time use
photon billing checkout

# Skip the picker with a positional tier
photon billing checkout pro
photon billing checkout business --qty 5

# Use a specific Stripe price (escape hatch)
photon billing checkout --plan price_xxx
```

When you run this command, the CLI creates a Stripe Checkout session and opens it in your browser. If you don't pass any arguments, you get an interactive picker listing the available plans. Pass a `[tier]` positional or `--plan <price-id>` to skip the picker.

Available tiers: `pro`, `business`, `enterprise`.

| Flag                | Description                                                            |
| ------------------- | ---------------------------------------------------------------------- |
| `[tier]`            | Positional tier (`pro` / `business` / `enterprise`). Skips the picker. |
| `--plan <price-id>` | Stripe price ID. Escape hatch when you need a specific price.          |
| `--qty <number>`    | Quantity for the line item                                             |
| `--no-browser`      | Print the checkout URL instead of opening it                           |
| `--json`            | Output `{action, url, tier?}` as JSON and skip opening the browser     |

<Note>
  For project-scoped subscription management (which smart-routes between Checkout and the Stripe Portal), use [`photon projects upgrade`](/cli/projects#upgrade-subscription) instead.
</Note>

## Manage subscription (Stripe Portal)

```sh theme={null}
photon billing manage
```

Opens the Stripe Customer Portal where you can update payment methods, change plans, view invoices, or cancel. Pass `--no-browser` to get the portal URL printed to the terminal.

Aliases: `billing portal`.

## Common flags

| Flag                  | Env var             | Description                                  |
| --------------------- | ------------------- | -------------------------------------------- |
| `-p, --project <id>`  | `PHOTON_PROJECT_ID` | Target project                               |
| `--api-host <url>`    | `PHOTON_API_HOST`   | Override the backend URL                     |
| `-t, --token <token>` | `PHOTON_TOKEN`      | Use this token instead of stored credentials |
| `--json`              | —                   | Output as JSON                               |
| `--no-browser`        | —                   | Print URL instead of opening the browser     |
