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

# Plans

> Build v2 plans with lago v2 catalog-plans, apply rate cards, and sequence pricing with rate phases.

In v2, a plan holds no prices of its own. It applies rate cards, and each applied rate card follows a sequence of rate phases. The v2 command is `catalog-plans`, to keep it apart from the v1 `plans` command.

| Command | Description |
| - | - |
| `v2 catalog-plans create\|get\|list\|update` | Plans. Identifier: `code`. The v2 API has no plan delete. |
| `v2 plan-applied-rate-cards create <plan_code>` | Apply a rate card to the plan. |
| `v2 plan-applied-rate-cards get\|update\|delete <plan_code> <code>` | One applied rate card, addressed by its rate card code. `delete` is confirmation-gated. |
| `v2 plan-applied-rate-cards list <plan_code>` | Applied rate cards of the plan. |
| `v2 plan-rate-phases create\|list <plan_code> <applied_rate_card_code>` | Insert a phase, or list phases in position order. |
| `v2 plan-rate-phases update\|delete <plan_code> <applied_rate_card_code> <code>` | Edit or remove one phase. `delete` is confirmation-gated. |

Every `update` also exists as `patch`.

## catalog-plans

`create` takes `--name`, `--code` and `--currency` (required), plus `--description`, `--invoice-display-name` and `--tax-codes`. `list` filters by `--product-id`, `--product-filter-id`, `--product-category-id`, `--rate-card-id` and `--search-term`.

## plan-applied-rate-cards

| Flag | Description |
| - | - |
| `--rate-card-code` | Required. The rate card must use the plan's currency. One rate card per product and filter combination. |
| `--units` | Quantity for a fixed product, as a decimal string. Defaults to the default quantity. |
| `--rate-phases` | JSON array: the complete phase sequence. Omitted, it creates one indefinite phase that follows the active rate. An empty list is rejected. |

A plan attached to a Contract is locked: apply rate cards before any Contract uses the plan. Tax codes stay editable.

## plan-rate-phases

| Flag | Description |
| - | - |
| `--code`, `--name` | Phase identity. The code is unique within the applied rate card. |
| `--position` | One-based position. Inserting renumbers later phases. |
| `--billing-interval-cycle-count` | Number of billing cycles. Only the last phase is indefinite (`null`). |
| `--rate-override` | JSON pricing for this phase: `rate_model`, `rate_properties`, and optionally the billing interval. On update, `null` removes the override. |

The final indefinite phase and the only remaining phase cannot be deleted.

See [plans](https://getlago.com/docs/v2/guide/plans/overview.md) and [plan phases](https://getlago.com/docs/v2/guide/plans/plan-phases.md).

```bash catalog-plans theme={"dark"}
lago v2 catalog-plans create --name "API monthly" --code api_monthly --currency USD
lago v2 catalog-plans get api_monthly --expands taxes
lago v2 catalog-plans list --search-term api
```

```bash apply rate cards theme={"dark"}
lago v2 plan-applied-rate-cards create api_monthly \
  --rate-card-code monthly_service_usd --units 1
lago v2 plan-applied-rate-cards create api_monthly --rate-card-code api_calls_usd
lago v2 plan-applied-rate-cards list api_monthly --output json
```

```bash apply with phases theme={"dark"}
lago v2 plan-applied-rate-cards create introductory_offer --input '{
  "applied_rate_card": {
    "rate_card_code": "monthly_service_usd",
    "units": "1",
    "rate_phases": [
      {"code": "introductory", "position": 1, "billing_interval_cycle_count": 2,
       "rate_override": {"rate_model": "standard", "rate_properties": {"amount": "50"}}},
      {"code": "ongoing", "position": 2, "billing_interval_cycle_count": null,
       "rate_override": null}
    ]
  }
}'
```

```bash edit phases theme={"dark"}
lago v2 plan-rate-phases list introductory_offer monthly_service_usd
lago v2 plan-rate-phases update introductory_offer monthly_service_usd introductory \
  --billing-interval-cycle-count 3
```

```bash remove theme={"dark"}
lago v2 plan-applied-rate-cards delete api_monthly api_calls_usd --confirm api_calls_usd
```

```text catalog-plans create theme={"dark"}
LAGO_ID  1a901a90-1a90-1a90-1a90-1a901a901a90
CODE     api_monthly
NAME     API monthly
```

```json plan-applied-rate-cards list --output json theme={"dark"}
{
  "applied_rate_cards": [
    {
      "created_at": "2026-12-01T09:31:00Z",
      "deleted_at": null,
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a91",
      "plan_code": "api_monthly",
      "product_code": "api_calls_product",
      "product_filter_code": null,
      "rate_card_code": "api_calls_usd",
      "units": null,
      "updated_at": "2026-12-01T09:31:00Z"
    },
    {
      "created_at": "2026-12-01T09:30:00Z",
      "deleted_at": null,
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "plan_code": "api_monthly",
      "product_code": "monthly_service",
      "product_filter_code": null,
      "rate_card_code": "monthly_service_usd",
      "units": "1",
      "updated_at": "2026-12-01T09:30:00Z"
    }
  ],
  "meta": {
    "next_cursor": null,
    "prev_cursor": null
  }
}
```


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