# spend

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

> Spend pays an outside party for a Startup with a single-use card, within a Mandate and its Limit.

Spend pays an outside party for a [Startup](/business/nouns/startup) with a single-use card, within a [Mandate](/business/nouns/mandate) and its [Limit](/business/nouns/limit).

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `mandate` | [Mandate](/business/nouns/mandate) | Yes | The Mandate that covers the purchase. |
| `amount` | `money` | Yes | The amount to spend. |
| `payee` | `string` | Yes | Who is paid. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `transaction` | [Transaction](/business/nouns/transaction) | Yes | The card Transaction. |
| `mandate` | [Mandate](/business/nouns/mandate) | Yes | The Mandate with its remaining Limit. |

## Effects
- Emits [`Mandate.spent`](/business/events/Mandate.spent).
- Performed by the [Treasurer](/agents/finance/treasurer).
- One-way (money): it waits out its delay window, and runs in the `send` and `do` modes.
- Checks the Mandate’s Limit; above it, opens an Approval and the Action waits.
- Posts a cost Entry against the Action that spent.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The operation is part of an Offer the caller has not accepted or paid for. | [`payment-required`](/code/api/errors/payment-required) | Accept the Offer named in the response, then retry the call. | [Offer.accept](/business/nouns/offer/accept) |
| 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. | [Mandate.spend](/business/nouns/mandate/spend) |

## 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
Spend the latest mandate.
```

**API**

```bash
curl -X POST https://api.sb/kilnbakery.com/mandates/mandate_1/spend \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":{"amount":9,"currency":"USD"},"payee":"Example payee"}'
```

```json
{
  "api": "https://api.sb/kilnbakery.com",
  "transaction": {
    "$id": "https://api.sb/kilnbakery.com/transactions/transaction_1",
    "$type": "Transaction",
    "kind": "charge",
    "amount": {
      "amount": 9,
      "currency": "USD"
    }
  },
  "mandate": {
    "$id": "https://api.sb/kilnbakery.com/mandates/mandate_1",
    "$type": "Mandate",
    "expiresAt": "2026-10-22T12:00:00Z",
    "status": "active"
  },
  "action": {
    "$id": "https://api.sb/kilnbakery.com/actions/action_1",
    "operation": "Mandate.spend",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/actions/action_1"
  }
}
```

**SDK**

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

const { transaction, mandate } = await $.Mandate.spend({ mandate: 'mandate_1', amount: { amount: 9, currency: 'USD' }, payee: 'Example payee' })
```

**CLI**

```bash
npx startup-builder do Mandate.spend --json '{"mandate":"mandate_1","amount":{"amount":9,"currency":"USD"},"payee":"Example payee"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Mandate.spend({ mandate: 'mandate_1', amount: { amount: 9, currency: 'USD' }, payee: 'Example payee' })"
  }
}
```