# Pay out to my bank

URL: /systems/finance/pay-out-to-my-bank · Id: `guide:pay-out-to-my-bank`

> Say "send everything available to the bank now" and get a payout from the payments balance, after its delay window, with every charge it carries listed.

Send available cash from the payments balance to your bank. A payout is one-way, so it waits its [delay window](/systems/trust-and-governance/controls/one-way-windows) before it leaves.

Needs: [Open a bank account](/systems/finance/open-a-bank-account)

**Before real money moves**

- Who says yes: You. Your agent shows you the run and waits for your [Approval](/business/nouns/approval).
- You leave the chat: Never: it all happens in the chat.

## What you get
- 1 payout of everything available, sent to your bank after its delay window (Transaction)
- 1 list of every charge, refund and fee the payout carries (Transaction)
- 2 lines in your books: cash out of the payments balance, into the bank (Entry)

## Your agent does
**For agents**

- Guide: `guide:pay-out-to-my-bank`, status `beta`. Page: [/systems/finance/pay-out-to-my-bank.md](/systems/finance/pay-out-to-my-bank.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: never.
- Needs first: [Open a bank account](/systems/finance/open-a-bank-account).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Account.payout`](/business/nouns/account/payout) (`verb:Account.payout`) | `account` Account (an id), required: the `$id` of the first Account `Account.list` returns for `where: heldAt = payments` | `account` Account, `transaction` Transaction |

Returns: the last call answers with `account`, `transaction` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "account": {
    "$id": "https://api.sb/leaseline.app/accounts/account_1",
    "$type": "Account"
  },
  "transaction": {
    "$id": "https://api.sb/leaseline.app/transactions/transaction_1",
    "$type": "Transaction"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Account.payout",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Pay out weekly instead of daily”, or “Send $2,000 now and keep the rest”.

Calls: `Account.payout`

Ask:

```text
Send everything available to the bank now.
Pay out to my bank.
Move my Stripe balance to the bank.
```

API:

```bash
# Look up the Account: Account.list
ACCOUNT=$(curl "https://api.sb/leaseline.app/accounts?where=heldAt%20%3D%20payments&limit=1" \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" | jq -r '.accounts[0]["$id"] | split("/") | last')

# Account.payout
curl -X POST https://api.sb/leaseline.app/accounts/$ACCOUNT/payout \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

const [account] = await $.Account.list({ where: 'heldAt = payments', limit: 1 })
await $.Account.payout({ account: account.$id })
```

CLI:

```bash
ACCOUNT=$(npx startup-builder do Account.list --json '{"where":"heldAt = payments","limit":1}' | jq -r '.accounts[0]["$id"] | split("/") | last')
npx startup-builder do Account.payout --json '{"account":"'"$ACCOUNT"'"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const [account] = await $.Account.list({ where: 'heldAt = payments', limit: 1 })\nreturn await $.Account.payout({ account: account.$id })"
  }
}
```

## Change it
- Pay out weekly instead of daily.
- Send $2,000 now and keep the rest.
- Send it within minutes instead.

## Under the hood
- Systems: [Treasury](/systems/treasury), [Ledger](/systems/ledger)
- Nouns: [Account](/business/nouns/account), [Transaction](/business/nouns/transaction), [Entry](/business/nouns/entry)
- Events: [`Account.paidOut`](/business/events/Account.paidOut)
- Stripe objects: `Balance`, `Payout`

[`Account.payout`](/business/nouns/account/payout) runs on the [Account](/business/nouns/account)'s `payoutSchedule`, daily by default; a call sends one now, and `schedule` changes the rhythm. `instant` sends it within minutes for Stripe's instant payout cost, which posts as its own [Entry](/business/nouns/entry). A payout the bank returns lands back in the payments balance with a [Task](/business/nouns/task) to fix the bank details.