> ## Documentation Index
> Fetch the complete documentation index at: https://docs.easner.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payees

> The people your platform pays through Easner.

A payee is one person at your platform, named by your `reference` (your user id). Creating a payee and reading payees are not signed. Changing a payee on a live key is signed.

> [!NOTE]
>
> **Scope:** `GET` needs `payees.read`. `POST /v1/payees` and `POST /v1/payees/:id` need `payees.write`. Link sessions need `payees.write`.

## Create

`POST /v1/payees` creates one, or returns the existing payee when the reference is already there. The `reference` never changes.

```bash theme={null}
curl https://api.easner.com/v1/payees \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reference": "user_1042", "name": "Ada O.", "email": "ada@example.com", "country": "NG" }'
```

## Change

`POST /v1/payees/:id` changes `name`, `email`, `country` or `income_type` (send `null` to clear one). Sending the values the payee already has changes nothing. Every real change is recorded with the values before and after.

## Retrieve and list

`GET /v1/payees/:id` reads one. `GET /v1/payees` lists them, newest first. Page with `limit` (default 20, maximum 100), `starting_after` or `ending_before`, and `created[gte]` / `created[lte]`.

`GET /v1/payees/:id/balance` gives the figures and the next step, so you never compute it yourself:

```json theme={null}
{
  "object": "payee_balance",
  "available": 41250,
  "on_hold": 0,
  "pending": 0,
  "in_flight": 0,
  "offset": 0,
  "withdrawable": 41250,
  "minimum_payout": 100,
  "reason": null,
  "next_action": "payout"
}
```

`next_action` is `link` (the person has not connected an Easner account), `payout`, `wait_for_hold`, `contact_support` or `none`. `reason` says why `withdrawable` is 0.

A payee is `pending_link` until they connect, then `linked`. `restricted` means payouts to them stop.

## Person or business

The payee object has a `type`: `individual` when the person linked their own Easner account, `business` when they linked an Easner Business account they own or administer (a label, a studio, an agency). Easner sets it from the active link, so you cannot set it, and it is `null` until the payee is linked. A payout to a business payee lands in the business's USD balance, and the tax form held for it is a W-9 or W-8BEN-E. Everything else about the payee, the balance and the payouts works the same.

A business connects from **Easner Business on the web**, not from the Easner app: the app is for individuals. The connect code and link are the same. When your payee is a company, tell them to open Easner Business, choose Earnings, and enter the code (or open your connect link while signed in to the business). Only an Owner or Admin of the business can connect it, and in live mode the business must be verified. A person who scans the code in the app connects their own account.

## Link an Easner account

`POST /v1/link_sessions` opens a 60 minute session. Send `code_challenge`, `state` and `redirect_uri`, and either an existing payee id or the fields for a new one. The answer includes `client_secret` for [`EasnerConnect.connect`](https://docs.easner.com/connect-components).

When the person approves, your server finishes the link with `POST /v1/link_sessions/:id/redeem` and the `code_verifier` that matches the challenge, plus the `code` from the approval. A code from an account whose email does not match the payee is refused.

If the email rule holds the link back, `POST /v1/link_sessions/:id/confirm` confirms it. In test, `POST /v1/test/payees/:id/approve_link` connects the person without this exchange. `POST /v1/test/payees/:id/unlink` clears a test link so the same `pye_` id and your `reference` can run the link path again.

A link lasts until you or the person disconnects it. Connecting a different account holds payouts for 72 hours and sends `payee.relinked`. For seven days after a link, more than `$2,000` in a day for that person waits for your review.

## Events

| Event | When |
| - | - |
| `payee.linked` | The person connects an Easner account |
| `payee.unlinked` | The link is removed |
| `payee.relinked` | They connect a different account, including switching between their own account and a business. Payouts wait 72 hours |
| `payee.link_confirmation_required` | The email rule held the link back |
| `payee.restricted` | Payouts to this person stop |
| `payee.balance.updated` | A hold ends, or a payout's money comes back |

## Expected

* Store your `reference` and the `pye_` id. Calling create again with the same reference returns the same payee.
* Open the sheet with the link session `client_secret`. Do not put the secret key in the browser. See [Connect components](https://docs.easner.com/connect-components.md).
* Read balance from `GET /v1/payees/:id/balance` before you show what a person can withdraw.

> [card] [Credits and payouts](https://docs.easner.com/connect-money.md)
>
> Record earnings, pay people out, and handle tax forms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.