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

# Credits and payouts

> Record earnings, pay people out, and handle tax forms.

Connect money moves in two server steps: a **credit** records what someone earned (your balance is unchanged), then a **payout** sends available earnings to their linked Easner account. Tax forms can hold payouts until the person is ready.

> [!NOTE]
>
> **Scopes:** `payees.credit` for credits and reversals. `payouts.write` for payouts and payout sessions. `GET /v1/payouts` and limits need `payees.read`. Live credits and payouts use your secret key. Amounts are whole cents in USD.

## Credits

A credit raises what you owe a person. It does not debit your balance. A reversal takes some back. If they were already paid, the difference is recovered from their next credits.

```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: earn-2026-10-1042" \
  -d '{ "amount": 41250, "reference": "oct-2026-royalties", "description": "October 2026" }'
```

A credit with an `available_at` in the future is `on_hold` until then. Retrying a credit with the same `Idempotency-Key` (default: the `reference`) returns the first one with `200`. The same reference with a different amount is refused.

A credit far above that person's usual size waits until an Owner confirms it. Until then it cannot be paid.

### Batch credits

`POST /v1/credits/batch` credits up to 1,000 people in one call, **all or nothing**. Send the number of credits (`count`) and their sum in cents (`total`) as control totals. If either does not match, if a reference repeats, if a payee is not yours, or if any credit is invalid, nothing is credited and the error names the problem (for example `credits[3]` or the reference of the unknown payee).

```bash theme={null}
curl https://api.easner.com/v1/credits/batch \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: royalties-2026-10" \
  -d '{
    "count": 2,
    "total": 30353,
    "credits": [
      { "payee": "pye_…", "amount": 10000, "reference": "oct-a" },
      { "payee": "pye_…", "amount": 20353, "reference": "oct-b", "description": "October 2026" }
    ]
  }'
```

An `Idempotency-Key` is required. Sending the same call again with the same key and the same credits credits nothing twice and answers `200`. The same key with different credits is `409` `idempotency_key_reused`. The answer lists every credit with its `crd_…` id.

### Reverse a credit

You can reverse a credit that is still available. If they were already paid, the difference comes out of later credits. `POST /v1/credits/:id/reversals`.

| Event | When |
| - | - |
| `credit.available` | A hold ends and the earnings can be paid |
| `payee.balance.updated` | The same moment, and when a payout's money comes back |

Creating a credit does not send a payout event. Nothing has moved.

## Payouts

A payout takes money from your USD balance and from what you owe the person, in one step, and sends it to the Easner account they linked. Only that account can receive it.

Programs set to automatic create at most one payout per person per day from what is available. Programs set to payee requests pay when the person, or your withdraw sheet, asks.

`POST /v1/payouts` needs an `Idempotency-Key` and a `source`: `payee_balance` pays out of what you credited, `platform_balance` pays an amount you pass directly.

```bash theme={null}
curl https://api.easner.com/v1/payouts \
  -H "Authorization: Bearer $EASNER_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: payout-1042-oct" \
  -d '{ "payee": "pye_…", "amount": 41250, "source": "payee_balance" }'
```

The `status` is `in_flight` (on its way), `pending` (waiting, see `pending_reason`), `held` (waiting for review, see `held_reason`), then `completed`, or `failed` (your balance and the person's balance are restored). Retrying with the same key returns the same payout. The same key with different terms is `409` `idempotency_key_reused`.

A payout never fails because your balance or your limit is short. It waits, and goes out on its own, oldest first, as soon as it can.

### When a payout waits

| `pending_reason` | What it means |
| - | - |
| `funds` | Add money. The person sees Pending. They are not told your balance is short |
| `limit` | It pays when your payout limit has room |
| `tax_form` | It pays when their form is on file. See [Tax forms](#tax-forms) below |

A payout caught by a review rule is `held`. You approve or decline it. One authenticator code covers a batch. A hold with reason `easner` is Easner's, and only Office can clear it.

### Retrieve, list and limits

`GET /v1/payouts/:id` reads one. `GET /v1/payouts` lists them, newest first. Filter with `payee`, and page the same way as [Payees](https://docs.easner.com/payees.md).

`GET /v1/payout_limits` shows your account's rolling 24 hour and 30 day payout allowance and what is used.

### Payout events

| Event | When |
| - | - |
| `payout.created` | A payout is opened |
| `payout.held` | A review rule holds it |
| `payout.waiting_for_funds` | Your balance is short |
| `payout.waiting_for_limit` | The payout limit is full |
| `payout.waiting_for_tax_form` | The form or the consent is missing |
| `payout.completed` | The money reached their Easner account |
| `payout.failed` | It did not. Both balances are restored |

To let a person withdraw on your site, open a payout session and pass `client_secret` to [`EasnerConnect.withdraw`](https://docs.easner.com/connect-components). See [Connect components](https://docs.easner.com/connect-components.md).

## Tax forms

A person has one tax form. A US person uses W-9. A person outside the US uses W-8BEN. A business payee uses W-9 or W-8BEN-E, signed by an Owner or Admin of the business and held against the business, not the person. The form is prefilled from verification. Each company needs its own consent.

You can require the form at connect. A payout then waits with `pending_reason: tax_form` until the form is valid and the person has consented for your program.

A form already on file asks only for consent. `payee.tax_form.updated` fires when they consent or the form changes.

You see that the form is done, its type, and the last four digits. The full tax number is not in the API response.

You remain the one who files. Year-end copies are prepared from credits and payouts. They are not sent to the IRS until a filing vendor is configured, and not before the form text is reviewed.

### Withholding on a payout

Every payout carries a `withholding` object: `amount` in cents, `rate` as a fraction (`0.3` is 30%) and a `reason` in words. It is what US tax rules suggest for that payee and that income. Easner does not hold anything back: the payout is paid in full, and you decide what to withhold from what you owe.

| Situation | Suggested |
| - | - |
| No valid tax form on file | 24% backup withholding |
| W-9 on file | None |
| W-8BEN, services performed outside the US | None |
| W-8BEN, royalties | The treaty rate the person claimed, otherwise 30% |
| W-8BEN, other income, or services performed in the US | The treaty rate the person claimed, otherwise 30% |

The income type is the payout's own (`income_type`), which falls back to the payee's and then your program's default. If your program pays for work done in the US, set **Services are performed in the US** in Connect settings. The figure is advice, not tax advice: you stay the withholding agent and the filer.

## Expected

* Credit before you pay. A payout against an empty balance waits or is refused by the amount you send.
* Use one `reference` per earning. A retry with that reference returns the first credit.
* A batch is all or nothing. There is no mode that skips the bad rows.
* Fulfil on `payout.completed`, not on the HTTP response from create.


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