# polymorfa billing

> Commands under polymorfa billing.

## Commands

- [polymorfa billing controls get](https://docs.polymorfa.com/cli/billing/controls-get): Read one resource limit and priority.
- [polymorfa billing controls set](https://docs.polymorfa.com/cli/billing/controls-set): Atomically save one resource limit and priority.
- [polymorfa billing limits list](https://docs.polymorfa.com/cli/billing/limits-list): Read monthly project and number spending limits.
- [polymorfa billing limits set](https://docs.polymorfa.com/cli/billing/limits-set): Set or remove a monthly spending limit.
- [polymorfa billing priority list](https://docs.polymorfa.com/cli/billing/priority-list): Read project, customer and number funding priorities.
- [polymorfa billing priority reorder](https://docs.polymorfa.com/cli/billing/priority-reorder): Save a complete funding order atomically.
- [polymorfa billing priority set](https://docs.polymorfa.com/cli/billing/priority-set): Set a project or number funding priority.

## polymorfa billing controls get

Read one resource limit and priority.

### Usage

```bash
polymorfa billing controls get ID [flags]
```

### Arguments

- `ID` (required). Resource UUID.

### Flags

- `--scope <value>` (value, required). Values: `project`, `customer`, `number`.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa billing controls set

Atomically save one resource limit and priority.

### Usage

```bash
polymorfa billing controls set ID [flags]
```

### Arguments

- `ID` (required). Resource UUID.

### Flags

- `--credits <value>` (value).
- `--expected-budget-revision <value>` (value, required).
- `--expected-priority-revision <value>` (value, required).
- `--priority <value>` (value, required).
- `--scope <value>` (value, required). Values: `project`, `customer`, `number`.
- `--unlimited` (boolean).

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa billing limits list

Read monthly project and number spending limits.

Requires a team key with billing:read. Use --project to include its number limits. Months reset on the first day at 00:00 UTC.

### Usage

```bash
polymorfa billing limits list [flags]
```

### Flags

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa billing limits set

Set or remove a monthly spending limit.

Requires Pay-As-You-Go and a team key with billing:manage. Zero blocks new charges; already-paid service continues. A stale observed revision fails without overwriting newer settings.

### Usage

```bash
polymorfa billing limits set ID [flags]
```

### Arguments

- `ID` (required). Project or number UUID.

### Flags

- `--credits <value>` (value). Monthly Polymorfa credits, up to six decimal places.
- `--expected-revision <value>` (value, required). Revision from billing limits list.
- `--scope <value>` (value, required). Values: `project`, `customer`, `number`.
- `--unlimited` (boolean). Remove the limit.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa billing priority list

Read project, customer and number funding priorities.

Requires a team key with billing:read. Project priority takes precedence. Numbers inherit customer priority; a higher number priority overrides it. Use --project for its funding controls. Includes the revision used for changes.

### Usage

```bash
polymorfa billing priority list [flags]
```

### Flags

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa billing priority reorder

Save a complete funding order atomically.

Requires Pay-As-You-Go and a team key with billing:manage. Pass every active project, customer or real number for its scope. Resource scope mixes all customers and numbers in --project, highest first. Incomplete or stale orders fail without partial changes.

### Usage

```bash
polymorfa billing priority reorder [flags]
```

### Flags

- `--expected-revision <value>` (value, required).
- `--ids <value>` (value). UUIDs, highest first. For resource scope use customer:UUID or number:UUID.
- `--ids-file <value>` (value). JSON array of ordered IDs; supports large lists.
- `--scope <value>` (value, required). Values: `project`, `customer`, `number`, `resource`.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

## polymorfa billing priority set

Set a project or number funding priority.

Requires Pay-As-You-Go and a team key with billing:manage. Changes future renewal protection and recovery; paid windows keep their expiry.

### Usage

```bash
polymorfa billing priority set ID [flags]
```

### Arguments

- `ID` (required). Project or number UUID.

### Flags

- `--expected-revision <value>` (value, required).
- `--priority <value>` (value, required).
- `--scope <value>` (value, required). Values: `project`, `customer`, `number`.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).
