# pay

URL: /business/nouns/bill/pay · Id: `verb:Bill.pay` · Call: `await $.Bill.pay({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Pay sends an approved Bill’s amount to its Organization on the due date and reconciles the payment to Entries.

Pay sends an approved [Bill](/business/nouns/bill)’s amount to its [Organization](/business/nouns/organization) on the due date and reconciles the payment to [Entries](/business/nouns/entry).

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `bill` | [Bill](/business/nouns/bill) | Yes | The approved Bill. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `transaction` | [Transaction](/business/nouns/transaction) | Yes | The payment Transaction. |
| `bill` | [Bill](/business/nouns/bill) | Yes | The Bill, now paid. |

## Effects
- Emits [`Bill.paid`](/business/events/Bill.paid).
- Performed by the [Treasurer](/agents/finance/treasurer).
- One-way (money): it waits out its delay window, and runs in the `send` and `do` modes.
- Pays from the Startup’s Stripe balance or a linked bank account.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Bill.pay](/business/nouns/bill/pay) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Medium: one-way, bounded (money) |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | 1 business hour, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The spend [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) or [Mandate](/business/nouns/mandate) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Pay the latest bill.
```

**API**

```bash
curl -X POST https://api.sb/patentpad.com/bills/bill_1/pay \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/patentpad.com",
  "transaction": {
    "$id": "https://api.sb/patentpad.com/transactions/transaction_1",
    "$type": "Transaction",
    "kind": "charge",
    "amount": {
      "amount": 499,
      "currency": "USD"
    }
  },
  "bill": {
    "$id": "https://api.sb/patentpad.com/bills/bill_1",
    "$type": "Bill",
    "organization": "organization_1",
    "amount": {
      "amount": 499,
      "currency": "USD"
    },
    "dueOn": "2026-10-22",
    "status": "received"
  },
  "action": {
    "$id": "https://api.sb/patentpad.com/actions/action_1",
    "operation": "Bill.pay",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/patentpad.com/actions/action_1"
  }
}
```

**SDK**

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

const { transaction, bill } = await $.Bill.pay({ bill: 'bill_1' })
```

**CLI**

```bash
npx startup-builder do Bill.pay --json '{"bill":"bill_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Bill.pay({ bill: 'bill_1' })"
  }
}
```

Guides that call it: [Pay a supplier](/systems/finance/pay-a-supplier).