# Payouts and balances

> Read live Moov wallet balances, list bank accounts, and send ACH payouts from the merchant wallet to a verified bank account.

Buyer payments settle into the merchant's own Moov wallet. Moov holds the money and is the only source of the balance. A payout moves money from that wallet to the merchant's verified bank account.

> **Warning:** Never compute or store a spendable balance yourself. Read it from `GET /merchant/wallets` each time you need it.

## Wallet balances

```text
GET /merchant/wallets
```

Ability: `wallets:read`.

```bash
curl -sS "$NORTHECHPAY_API_BASE/merchant/wallets?fresh=1" \
  -H "Authorization: Bearer $NORTHECHPAY_API_KEY" \
  -H "Accept: application/json"
```

```js
const response = await fetch(
    `${process.env.NORTHECHPAY_API_BASE}/merchant/wallets?fresh=1`,
    {
        headers: {
            Authorization: `Bearer ${process.env.NORTHECHPAY_API_KEY}`,
            Accept: 'application/json',
        },
    },
);
const { data: wallets, meta } = await response.json();
```

```php
$wallets = Http::baseUrl(config('services.northechpay.api_base'))
    ->withToken(config('services.northechpay.api_key'))
    ->acceptJson()
    ->get('/merchant/wallets', ['fresh' => 1])
    ->throw()
    ->json('data');
```

The response:

```json
{
    "data": [
        {
            "id": "…",
            "object": "wallet",
            "name": "…",
            "type": "default",
            "status": "active",
            "available_balance": {
                "amount": 1450,
                "currency": "USD",
                "decimal": "14.50",
                "formatted": "$14.50"
            },
            "custodian": "moov",
            "created_at": "2026-11-23T15:50:00+00:00"
        }
    ],
    "meta": {
        "source": "moov",
        "custodian": "moov",
        "fetched_at": "2026-11-24T16:40:00+00:00"
    }
}
```

- Balances are read from Moov and cached for up to 30 seconds by default. Add `fresh=1` to skip the cache.
- A merchant with no Moov account yet gets an empty list.
- Card payments add to the available balance only after they complete. An `authorized` payment is not spendable yet.

## Wallet transactions

```text
GET /merchant/wallets/{wallet_id}/transactions
```

Ability: `wallets:read`. This reads Moov's wallet ledger directly.

| Query parameter | Meaning                                                   |
| --------------- | --------------------------------------------------------- |
| `status`        | Moov wallet transaction status, for example `completed`.  |
| `type`          | Moov wallet transaction type, for example `card-payment`. |
| `per_page`      | 1 to 100. Default 25.                                     |
| `skip`          | How many to skip, for paging. Default 0.                  |

Each item has `id`, `type`, `source_type`, `source_id`, `status`, `memo`, `gross`, `fee`, `net`, `balance_after`, `created_at` and `completed_at`. Money fields are money objects. `meta` has `source: "moov"`, `per_page` and `skip`. There is no total count. Page with `skip` until a page has fewer items than `per_page`.

> **Note:** NorthechPay does not provide fee or revenue reports. `fee` is passed through exactly as Moov returns it.

## Bank accounts

```text
GET /merchant/bank-accounts
```

Ability: `bank-accounts:read`.

| Field                                      | Meaning                                                                                   |
| ------------------------------------------ | ----------------------------------------------------------------------------------------- |
| `id`                                       | Moov bank account ID. Use it as `bank_account_id` for payouts.                            |
| `status`                                   | Moov's bank account status.                                                               |
| `verified`                                 | `true` when Moov has verified the account.                                                |
| `holder_name`, `bank_name`, `account_type` | Account details.                                                                          |
| `routing_number`, `last_four`              | The routing number and the last four digits only.                                         |
| `status_reason`                            | Moov's reason, if the account has a problem.                                              |
| `payout_methods`                           | Payout methods Moov currently offers for this account, for example `ach-credit-standard`. |

Linking a bank account and confirming micro-deposits need `bank-accounts:write`, which API keys cannot hold. An owner or admin does this in the dashboard.

## Create a payout

```text
POST /merchant/payouts
```

Ability: `payouts:write`.

| Field             | Rules                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------ |
| `amount`          | Required integer, cents, `1` to `10000000`.                                                |
| `bank_account_id` | Required. A bank account `id` (UUID) from `GET /merchant/bank-accounts`.                   |
| `method`          | Optional. `ach-credit-standard` (default), `ach-credit-same-day` or `instant-bank-credit`. |
| `description`     | Optional. Up to 100 characters.                                                            |
| `idempotency_key` | Body alternative to the `Idempotency-Key` header. One of the two is required.              |

```bash
curl -sS -X POST "$NORTHECHPAY_API_BASE/merchant/payouts" \
  -H "Authorization: Bearer $NORTHECHPAY_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: payout-2026-11-24-01" \
  -d '{"amount":1000,"bank_account_id":"9f2b1c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d","method":"ach-credit-standard"}'
```

```js
const response = await fetch(
    `${process.env.NORTHECHPAY_API_BASE}/merchant/payouts`,
    {
        method: 'POST',
        headers: {
            Authorization: `Bearer ${process.env.NORTHECHPAY_API_KEY}`,
            Accept: 'application/json',
            'Content-Type': 'application/json',
            'Idempotency-Key': 'payout-2026-11-24-01',
        },
        body: JSON.stringify({
            amount: 1000,
            bank_account_id: '9f2b1c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d',
            method: 'ach-credit-standard',
        }),
    },
);
const { data: payout } = await response.json();
```

```php
$payout = Http::baseUrl(config('services.northechpay.api_base'))
    ->withToken(config('services.northechpay.api_key'))
    ->acceptJson()
    ->withHeaders(['Idempotency-Key' => 'payout-2026-11-24-01'])
    ->post('/merchant/payouts', [
        'amount' => 1000,
        'bank_account_id' => '9f2b1c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d',
        'method' => 'ach-credit-standard',
    ])
    ->throw()
    ->json('data');
```

Before it calls Moov, NorthechPay checks the Moov capability for the method, that the bank account is eligible for that method, and the live Moov available balance.

A new payout returns `201`. A replay of the same key and body returns `200` with `Idempotent-Replayed: true`. The same key with a different body returns `409 idempotency_conflict`.

The payout is never `completed` in the create response. Expect `submitted`, `pending` or `outcome_unknown`.

```json
{
    "data": {
        "id": "01a20943-1b2c-7d3e-8f4a-5b6c7d8e0da5",
        "object": "payout",
        "status": "pending",
        "status_label": "In transit",
        "amount": {
            "amount": 1000,
            "currency": "USD",
            "decimal": "10.00",
            "formatted": "$10.00"
        },
        "method": "ach-credit-standard",
        "method_label": "Standard ACH (1–3 business days)",
        "bank_account": {
            "id": "9f2b1c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
            "bank_name": "…",
            "last_four": "4321"
        },
        "moov_transfer_id": "…",
        "failure": null,
        "submitted_at": "2026-11-24T16:35:00+00:00",
        "completed_at": null,
        "created_at": "2026-11-24T16:35:00+00:00",
        "last_synced_at": "2026-11-24T16:35:01+00:00"
    }
}
```

> **Note:** Instant payouts are not available. `instant-bank-credit` is accepted by validation, but it needs the Moov `send-funds.instant-bank` capability, which NorthechPay does not request for merchants. Expect `422 merchant_not_ready`.

## Track a payout

| Method | Path                             | Ability        | Purpose                                                     |
| ------ | -------------------------------- | -------------- | ----------------------------------------------------------- |
| `GET`  | `/merchant/payouts`              | `payouts:read` | List payouts, newest first (`per_page` default 20, max 100) |
| `GET`  | `/merchant/payouts/{id}`         | `payouts:read` | Read one payout                                             |
| `POST` | `/merchant/payouts/{id}/refresh` | `payouts:read` | Re-read it from Moov now                                    |

Webhooks: `payout.pending`, `payout.completed`, `payout.failed`. Each is sent at most once per payout. `payout.failed` also covers `canceled` and `reversed` (returned). See [Statuses](/docs/statuses#payouts).

## Unknown outcomes

If Moov times out or cannot be reached, the payout is saved with status `outcome_unknown` and the create call still returns `201` with that payout. NorthechPay tries to look the transfer up at Moov by its own payout ID right away, and again on its scheduled re-reads.

1. Do not create another payout with a new key. That can pay out twice.
2. Call `POST /merchant/payouts/{id}/refresh` later, or wait for a payout webhook.
3. A retry with the same key returns the same payout. It does not send a second transfer.

## Errors

| HTTP | `error.code`                 | Meaning                                                                           |
| ---- | ---------------------------- | --------------------------------------------------------------------------------- |
| 403  | `insufficient_scope`         | The key lacks `payouts:write`.                                                    |
| 409  | `idempotency_conflict`       | The key was used with a different payout.                                         |
| 422  | `validation_failed`          | A field is invalid, for example `bank_account_id` is not a UUID.                  |
| 422  | `merchant_not_ready`         | The Moov capability for this method is missing, or the merchant is not onboarded. |
| 422  | `bank_account_not_eligible`  | The bank account is not verified for this method. See `details`.                  |
| 422  | `insufficient_balance`       | The Moov available balance is lower than the amount. `details.available` has it.  |
| 422  | `provider_validation_failed` | Moov rejected the transfer. The payout is `failed`.                               |
