# `Tipalti.Payees`
[🔗](https://github.com/iamkanishka/tipalti/blob/main/lib/tipalti/payees.ex#L1)

Modern REST API — payee onboarding and management.

Endpoint shapes follow Tipalti's documented conventions for the modern
REST API (resource-oriented URLs under `/api/v1`, cursor-based pagination
via a `cursor`/`limit` query pair and a `next_cursor` field in list
responses, JSON bodies, OAuth2 bearer auth). If your Tipalti instance's
exact response envelope differs, override `Tipalti.Config` `:rest_base_url`
is not enough on its own — open an issue or adjust `@base_path` /
`extract_page/1` in this module to match; the request/auth/pagination/
error-handling machinery underneath (`Tipalti.Client`, `Tipalti.Pagination`)
is meant to be reused as-is.

# `activate`

```elixir
@spec activate(Tipalti.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}
```

Reactivates a previously suspended payee.

# `activate!`

```elixir
@spec activate!(Tipalti.Config.t(), String.t()) :: map()
```

# `create`

```elixir
@spec create(Tipalti.Config.t(), map()) :: {:ok, map()} | {:error, Exception.t()}
```

Creates a new payee.

# `create!`

```elixir
@spec create!(Tipalti.Config.t(), map()) :: map()
```

# `get`

```elixir
@spec get(Tipalti.Config.t(), String.t()) :: {:ok, map()} | {:error, Exception.t()}
```

Retrieves a single payee by ID.

# `get!`

```elixir
@spec get!(Tipalti.Config.t(), String.t()) :: map()
```

# `list`

```elixir
@spec list(
  Tipalti.Config.t(),
  keyword()
) :: {:ok, map()} | {:error, Exception.t()}
```

Lists payees. Returns a single page; see `stream/2` to walk every page.

# `list!`

```elixir
@spec list!(
  Tipalti.Config.t(),
  keyword()
) :: map()
```

Same as `list/2` but raises on error.

# `stream`

```elixir
@spec stream(
  Tipalti.Config.t(),
  keyword()
) :: Enumerable.t()
```

Returns a lazy `Stream` of every payee across all pages, fetching pages
on demand as the stream is consumed.

# `suspend`

```elixir
@spec suspend(Tipalti.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}
```

Suspends a payee, blocking further payments until reactivated.

# `suspend!`

```elixir
@spec suspend!(Tipalti.Config.t(), String.t()) :: map()
```

# `update`

```elixir
@spec update(Tipalti.Config.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Exception.t()}
```

Updates an existing payee.

# `update!`

```elixir
@spec update!(Tipalti.Config.t(), String.t(), map()) :: map()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
