> ## 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.

# Connect

> Pay the people on your platform into their own Easner accounts, from your server.

Connect is for a platform that owes money to many people: creators, sellers, drivers, affiliates, freelancers. Your own ledger decides who earns what. Easner holds the people's verified accounts and pays out of your Business balance, in seconds, to the Easner account each person linked once.

> [!NOTE]
>
> **Scopes:** `payees.read`, `payees.write`, `payees.credit`, `payouts.write`. Connect is available to businesses in Connect mode. Everything in Connect works with a **test key** first: nothing you do with `easner_sk_test_…` moves real money or needs a real person.

## Keys

Connect uses the same API keys as the rest of Easner: the `easner_sk_test_…` and `easner_sk_live_…` keys from Console → API keys. In Connect mode the key form offers the Connect scopes. A new **test** unrestricted key starts with `checkout`, payees read and write, **`payees.credit`**, and **`payouts.write`** so you can run the full path in test without ticking scopes first. A new **live** key starts with checkout and payees read and write only; tick earnings and payouts on purpose before live money. The secret key is enough for live money calls.

## The model

* A **payee** is one person at your platform, identified by your own `reference` (your user id). Create it with `POST /v1/payees`. Calling it again with the same `reference` returns the same payee.
* A **credit** is what the person earned. It moves no money: it raises the balance you owe them. A **reversal** takes some back. If the person was already paid, the difference is recovered from their next credits.
* A **payout** pays the balance out. Easner debits your Business USD balance and the payee's balance together, then sends the money to the person's own Easner account. Only the person's own linked account can ever receive it.
* A payout never fails because your balance or your limit is short. It waits, with a `pending_reason` (`funds`, `limit` or `tax_form`), and goes out on its own, oldest first, as soon as it can.

## In this section

| Topic | Page |
| - | - |
| Run the path once in test | [Quickstart](#quickstart) (on this page) |
| Payees and linking | [Payees](https://docs.easner.com/payees.md) |
| Credits, payouts and tax | [Credits and payouts](https://docs.easner.com/connect-money.md) |
| Sheets, withdraw flow and panel | [Connect components](https://docs.easner.com/connect-components.md) |
| Ledger check and allowed websites | [Ledger and security](https://docs.easner.com/connect-ops.md) |
| Distributor, marketplace, splits | [Platform patterns](https://docs.easner.com/connect-patterns.md) |
| Client paid first, person paid after approval | [Holding funds until the work is done](https://docs.easner.com/connect-escrow.md) |

## Quickstart

Use a test key. Nothing on this page moves real money.

1. Create a payee with your own reference.

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

2. Add what they earned. This does not move your balance. Amounts are cents. `41250` is `$412.50`.

```bash theme={null}
curl https://api.easner.com/v1/payees/pye_…/credits \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: royalty-april" \
  -d '{ "amount": 41250, "reference": "royalty-april" }'
```

3. Open a link session and pass `client_secret` to `EasnerConnect.connect`. The sheet shows a QR and an 8-character code. In test mode, **Approve as a test payee** finishes the path on a laptop.

4. When the program pays automatically, available earnings become one payout per person per day. When people request each payout, open a payout session and call `EasnerConnect.withdraw`.

## Test mode

A test key reaches a separate **test program** with its own virtual balance, so you can run every path without real money or real people:

| Call | What it does |
| - | - |
| `POST /v1/test/fund` `{ "amount": 100000 }` | Adds to the test balance |
| `POST /v1/test/payees/:id/approve_link` | The test person connects their account |
| `POST /v1/test/payees/:id/unlink` | Clears a test link so the same payee can link again (test keys only) |
| `POST /v1/test/settle` | Settles test payouts that are in flight now |

Test payouts also settle on their own within a minute. **An amount ending in 13 cents fails**, so you can test the failure path. A live key calling a test control gets `403` `test_mode_only`.

## Lists

`GET /v1/payees`, `/v1/payouts` and `/v1/payee_entries` answer `{ "object": "list", "data": [ … ], "has_more": true, "url": "/v1/payouts" }`, newest first. Page with `limit` (up to 100, default 20), and `starting_after` (the id of the last object you have) or `ending_before` (the id of the first, to page back), never both. Keep a time range with `created[gte]` and `created[lte]` (unix seconds or an ISO 8601 date). Filter payouts and entries with `payee`. A bad parameter, or an id that is not in the list, is `400` `invalid_request` and names the field.

Payout limits are in [Credits and payouts](https://docs.easner.com/connect-money.md#payouts).

See [Errors](https://docs.easner.com/errors.md) for every code, [API keys and scopes](https://docs.easner.com/api-keys.md) for what each key can do, and the [API reference](https://docs.easner.com/reference.md).


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