> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpaygent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpaygent.com/_mcp/server.

# Customers

> Manage the customers you bill.

A customer is who receives an invoice. Usage is reported against an agent for a customer, so both must exist before anything can be billed.

## `paygent customer create`

```bash
paygent customer create --name "Acme Corp" --external-id acme --email billing@acme.com
```

| Flag                                                   | Description                                     |
| ------------------------------------------------------ | ----------------------------------------------- |
| `--name <name>`                                        | Company or person name. Required.               |
| `--external-id <id>`                                   | Your own identifier, used when reporting usage. |
| `--email <email>`                                      | Where invoices are sent.                        |
| `--address`, `--city`, `--state`, `--zip`, `--country` | Appear on the invoice.                          |
| `--phone`, `--website`                                 | Contact details.                                |
| `--gstin`, `--place-of-supply`                         | Indian tax reporting. Ignored elsewhere.        |

## `paygent customer list`

```bash
paygent customer list
paygent customer list --search acme
```

## `paygent customer get`

```bash
paygent customer get acme
```

## `paygent customer update`

```bash
paygent customer update acme --email ap@acme.com
```

## `paygent customer ensure`

Create a customer only if it does not already exist. Idempotent, so it is safe on every request or deploy.

```bash
paygent customer ensure --external-id acme --name "Acme Corp"
```

## `paygent customer delete`

```bash
paygent customer delete acme --force
```