# List plans

`opensend billing plans`

The plans, what each allows in a month, what it costs by the month and by the year, what emails past a limit cost, and which one the workspace is on.

Needs the scope: `workspace:read`

## Returns

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. [Output and scripts](https://opensend.sh/docs/scripting) lists the codes.

- `object` ("list"): Always `list`.
- `data` (object[]): Every plan, cheapest first.
- `data[].object` ("plan"): Always `plan`.
- `data[].id` (string): The id of the plan: `free`, `pro` or `max`. One of: `free`, `pro`, `max`.
- `data[].name` (string): The name of the plan.
- `data[].priceCents` (integer): What it costs a month, in cents of a US dollar.
- `data[].yearlyPriceCents` (integer): What a year costs when it is paid by the year, in cents of a US dollar.
- `data[].extraEmailCents` (number | null): What every 1,000 emails past a limit cost, in cents of a US dollar. `null` when sending stops at the limit instead.
- `data[].limits` (Record<string, number>): What the plan allows in a month, by limit id.
- `data[].current` (boolean): Whether the workspace is on this plan now.
- `data[].sold` (boolean): Whether this installation sells the plan by the month, so a checkout can be opened.
- `data[].soldYearly` (boolean): Whether this installation sells the plan by the year.
- `connected` (boolean): Whether a payment provider is connected. Without one no plan can be bought.
- `interval` (string | null): How the current plan is paid: by the `month` or by the `year`. `null` when nobody pays for it. One of: `month`, `year`.

## Example

CLI:

```bash
opensend billing plans
```

Answer:

```json
{
  "object": "list",
  "data": [
    {
      "object": "plan",
      "id": "free",
      "name": "Free",
      "priceCents": 0,
      "yearlyPriceCents": 0,
      "extraEmailCents": null,
      "limits": {
        "transactional": 100,
        "marketing": 100,
        "received": 100,
        "contacts": 500,
        "domains": 2,
        "members": 1,
        "requests": 100000,
        "storage": 1073741824
      },
      "current": false,
      "sold": false,
      "soldYearly": false
    },
    {
      "object": "plan",
      "id": "pro",
      "name": "Pro",
      "priceCents": 1000,
      "yearlyPriceCents": 10000,
      "extraEmailCents": 60,
      "limits": {
        "transactional": 10000,
        "marketing": 10000,
        "received": 10000,
        "contacts": 20000,
        "domains": 50,
        "members": 5,
        "requests": 1000000,
        "storage": 10737418240
      },
      "current": false,
      "sold": true,
      "soldYearly": false
    },
    {
      "object": "plan",
      "id": "max",
      "name": "Max",
      "priceCents": 3000,
      "yearlyPriceCents": 30000,
      "extraEmailCents": 40,
      "limits": {
        "transactional": 50000,
        "marketing": 50000,
        "received": 50000,
        "requests": 10000000,
        "storage": 107374182400
      },
      "current": false,
      "sold": true,
      "soldYearly": false
    }
  ],
  "connected": true,
  "interval": null
}
```
