# Start checkout

`opensend billing checkout`

Answers with the address of a checkout page for a plan, paid by the month or by the year. The plan changes once it is paid.

Needs the scope: `workspace:write`

## Flags

- `--plan-id` (string, required): The plan to buy: `pro` or `max`. One of: `free`, `pro`, `max`.
- `--interval` (string): Pay by the `month` or by the `year`. By the month when left out. One of: `month`, `year`.

## 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` ("checkout"): Always `checkout`.
- `url` (string): The address of the page to send the person to.

## Example

CLI:

```bash
opensend billing checkout --plan-id pro
```

Answer:

```json
{
  "object": "checkout",
  "url": "https://pay.example.com/checkout/pro"
}
```
