# Claim the business and connect your bank

URL: /systems/finance/claim-and-connect-your-bank · Id: `guide:claim-and-connect-your-bank`

> Claim the Startup with your identity and your bank, and get a verified Stripe account, operating and reserve accounts, a card balance and daily payouts.

You claim a [Startup](/business/nouns/startup) once. Stripe verifies who you are and connects your own bank for payouts, and the Startup's operating and reserve accounts open with their own routing numbers.

Needs: [Startup](/business/nouns/startup)

**Before real money moves**

- Asks you first: You do it yourself: only you can claim the business, and Stripe confirms who you are. Your agent prepares the link.
- You leave the chat: Once, at Stripe: to confirm who you are and add the bank account payouts land in.

## What you get
- 1 payment account, verified once (Company)
- 2 operating and reserve accounts with routing numbers (Account)
- 1 card balance, held apart for company cards (Card)
- 1 daily payout of available cash to your bank (Transaction)
- 1 feed of every money movement, matched to your books (Transaction)
- 1 Treasurer agent that keeps a minimum cash balance (Role)

## Your agent does
**For agents**

- Guide: `guide:claim-and-connect-your-bank`. Page: [/systems/finance/claim-and-connect-your-bank.md](/systems/finance/claim-and-connect-your-bank.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: Once, at Stripe: to confirm who you are and add the bank account payouts land in.
- Needs first: [Startup](/business/nouns/startup).
- Run: call the steps in order, each through the API, CLI, MCP or SDK 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.
- Retry: each write sends the Idempotency-Key `claim-and-connect-your-bank-<the Startup's domain>-<run>-<step>` (`claim-and-connect-your-bank-leaseline.app-$RUN-1` for step 1 of the worked example), in the API and CLI as a header or flag and in the SDK as `{ idempotencyKey }`. Mint `run` once per founder request (`RUN=$(uuidgen)`, `crypto.randomUUID()`): the same ask made again later is a new request with a new run, so it runs again. After a timeout, rerun with the same run: api.sb returns each finished step's first Action and runs nothing twice.
- Retry in MCP: the `do` call carries `idempotencyKey: "claim-and-connect-your-bank-<the Startup's domain>-<run>"`, and each write inside sends it plus `-<n>`, its call number. Rerun the same code with the same key after a timeout: finished calls return their first Action, and only the rest run.
- Lookups: a `find:` reads the two newest matches and stops to ask the founder when there is not exactly one, so no write acts on a guessed record.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Startup.claim`](/business/nouns/startup/claim) (`verb:Startup.claim`) | `startup` Startup (an id), required: the `$id` of the one Startup `Startup.list` returns; ask the founder unless exactly one matches; `claimToken` string, required: example `"claim_7hq2x"` | `startup` Startup |

Returns: the last call answers with `startup` 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",
  "startup": {
    "$id": "https://api.sb/leaseline.app/startups/startup_l3hr1EnUGY",
    "$type": "Startup",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Startup.claim",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

Next: offer “Keep three months of spend in operating and sweep the rest to reserve”, or “Pay out weekly instead of daily”.

Calls: `Startup.claim`

Ask:

```text
Claim Leaseline and connect my bank.
Connect our bank to the business.
Claim the startup and verify who we are.
```

API:

```bash
# Look up the Startup: Startup.list
RUN=$(uuidgen)  # once per request; reuse it only to retry this request
STARTUP_MATCHES=$(curl "https://api.sb/leaseline.app/startups?limit=2" \
  -H "Authorization: Bearer $SB_TOKEN")
[ "$(echo "$STARTUP_MATCHES" | jq '.startups | length')" = 1 ] || { echo "Ask the founder which Startup"; exit 1; }
STARTUP=$(echo "$STARTUP_MATCHES" | jq -r '.startups[0]["$id"] | split("/") | last')

# Startup.claim
curl -X POST https://api.sb/leaseline.app/startups/$STARTUP/claim \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Idempotency-Key: claim-and-connect-your-bank-leaseline.app-$RUN-1" \
  -H "Content-Type: application/json" \
  -d '{"claimToken":"claim_7hq2x"}'
```

CLI:

```bash
RUN=$(uuidgen)  # once per request; reuse it only to retry this request
STARTUP_MATCHES=$(npx startup-builder do Startup.list --data '{"limit":2}' --json)
[ "$(echo "$STARTUP_MATCHES" | jq '.startups | length')" = 1 ] || { echo "Ask the founder which Startup"; exit 1; }
STARTUP=$(echo "$STARTUP_MATCHES" | jq -r '.startups[0]["$id"] | split("/") | last')
npx startup-builder do Startup.claim --data '{"startup":"'"$STARTUP"'","claimToken":"claim_7hq2x"}' --idempotency-key claim-and-connect-your-bank-leaseline.app-$RUN-1
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const startupMatches = await $.Startup.list({ limit: 2 })\nif (startupMatches.length !== 1) throw new Error(`Ask the founder which Startup: ${startupMatches.length} match`)\nconst [startup] = startupMatches\nreturn await $.Startup.claim({ startup: startup.$id, claimToken: 'claim_7hq2x' })",
    "idempotencyKey": "claim-and-connect-your-bank-leaseline.app-<run>"
  }
}
```

SDK:

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

const run = crypto.randomUUID() // once per request; reuse it only to retry this request
const startupMatches = await $.Startup.list({ limit: 2 })
if (startupMatches.length !== 1) throw new Error(`Ask the founder which Startup: ${startupMatches.length} match`)
const [startup] = startupMatches
await $.Startup.claim({ startup: startup.$id, claimToken: 'claim_7hq2x' }, { idempotencyKey: `claim-and-connect-your-bank-leaseline.app-${run}-1` })
```

## Change it
- Keep three months of spend in operating and sweep the rest to reserve.
- Pay out weekly instead of daily.
- Connect the bank account we already have.

## Under the hood
- Systems: [Treasury](/systems/treasury), [Ledger](/systems/ledger)
- Nouns: [Startup](/business/nouns/startup), [Company](/business/nouns/company), [Transaction](/business/nouns/transaction), [Entry](/business/nouns/entry)
- Events: [`Startup.claimed`](/business/events/Startup.claimed), [`Transaction.reconciled`](/business/events/Transaction.reconciled)
- Stripe objects: `Account`, `Person`, `Treasury Financial Account`, `Issuing Balance`, `Payout`

Every Startup is one Stripe connected account. Its cash sits in four places: the payments balance, the card balance, the operating and reserve accounts, and your bank. Each move between them is a [Transaction](/business/nouns/transaction) that [Treasury](/systems/treasury) reconciles to the [Ledger](/systems/ledger) within a day.