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

# billing

> CLI reference: floo billing — manage billing, spend caps, and plan upgrades

Manage billing, spending limits, and plan upgrades.

## spend-cap get

Show current spend cap and usage.

```bash theme={null}
floo billing spend-cap get
```

### JSON output

```json theme={null}
{
  "success": true,
  "data": {
    "spend_cap": 5000
  }
}
```

Value is in cents. `spend_cap` is `null` when no cap is set. Use `floo billing usage` for current period spend and cap status.

***

## spend-cap set

Set monthly spend cap in dollars. Use `0` to remove the cap (no limit).

```bash theme={null}
floo billing spend-cap set 50
```

### Arguments

| Argument | Description                                                                       |
| -------- | --------------------------------------------------------------------------------- |
| `AMOUNT` | Monthly spend cap in dollars. Range: $0 -- $1,000,000. Use `0` to remove the cap. |

### Examples

```bash theme={null}
# Set a $50/month cap
floo billing spend-cap set 50

# Remove spend cap
floo billing spend-cap set 0

# Agent workflow: set cap and confirm
floo billing spend-cap set 100 --json 2>/dev/null | jq -r '.data.spend_cap'
```

### JSON output

```json theme={null}
{
  "success": true,
  "data": {
    "spend_cap": 5000
  }
}
```

Value is in cents. Returns `null` when cap is removed (set to 0).

***

## upgrade

Open Stripe billing portal to upgrade plan.

```bash theme={null}
floo billing upgrade
```

### Flags

| Flag                      | Description |
| ------------------------- | ----------- |
| `--plan hobby\|pro\|team` | Target plan |

### Plans

| Plan       | Price          |
| ---------- | -------------- |
| Free       | \$0/mo         |
| Hobby      | \$5/mo         |
| Pro        | \$20/mo        |
| Team       | \$200/mo       |
| Enterprise | Custom pricing |

### Examples

```bash theme={null}
# Open upgrade portal (interactive plan selection)
floo billing upgrade

# Upgrade to a specific plan
floo billing upgrade --plan pro
```

### JSON output

For new subscriptions (opens Stripe checkout):

```json theme={null}
{
  "success": true,
  "data": {
    "url": "https://billing.stripe.com/session/..."
  }
}
```

For instant upgrades (existing subscription):

```json theme={null}
{
  "success": true,
  "data": {
    "upgraded": true,
    "plan": "pro"
  }
}
```

***

## usage

Show current plan, usage, and spend cap with visual progress bar.

```bash theme={null}
floo billing usage
```

```
Plan: Pro ($20/mo)
Included compute: 20 credits / month
Current spend: 12.34 credits
Spend cap: 50 credits / month
Usage: 25% of cap
████████░░░░░░░░░░░░░░░░░░░░░░  25%
```

### Flags

| Flag                            | Description                                                      | Default         |
| ------------------------------- | ---------------------------------------------------------------- | --------------- |
| `--period PERIOD` / `-p PERIOD` | Compute-cost window: `current_month`, `last_month`, or `last_7d` | `current_month` |

One compute credit equals \$1 of metered app usage. Plan tiers include 5 lifetime credits (Free), 5 / month (Hobby), 20 / month (Pro), and 200 / month (Team).

### JSON output

```json theme={null}
{
  "success": true,
  "data": {
    "plan": "pro",
    "spend_cap_cents": 5000,
    "max_spend_cap_cents": 100000,
    "current_period_spend_cents": 1234,
    "spend_cap_exceeded": false
  }
}
```

***

## contact

Print enterprise contact info.

```bash theme={null}
floo billing contact
```

```
Enterprise & custom plans: sales@getfloo.com
Subject: Enterprise inquiry
```

### JSON output

```json theme={null}
{
  "success": true,
  "data": {
    "email": "sales@getfloo.com",
    "subject": "Enterprise inquiry"
  }
}
```

***

## Errors

| Code                | Meaning                                     |
| ------------------- | ------------------------------------------- |
| `NOT_AUTHENTICATED` | Run `floo auth login` first                 |
| `INVALID_AMOUNT`    | Spend cap must be between $0 and $1,000,000 |
