# pay

URL: /business/nouns/commission/pay · Id: `verb:Commission.pay` · Call: `await $.Commission.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 transfers a Commission’s earned, unpaid amount to the Partner’s connected account through Stripe.

Pay transfers a [Commission](/business/nouns/commission)’s earned, unpaid amount to the [Partner](/business/nouns/partner)’s connected account through Stripe.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `commission` | [Commission](/business/nouns/commission) | Yes | The Commission with an amount past its clawback window. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `commission` | [Commission](/business/nouns/commission) | Yes | The Commission, its `paid` raised by the transfer. |
| `transaction` | [Transaction](/business/nouns/transaction) | Yes | The transfer as the rail reports it. |

## Effects
- Emits [`Commission.paid`](/business/events/Commission.paid).
- Performed by the [Billing Specialist](/agents/finance/billing-specialist).
- One-way (money): it waits out its delay window, and runs in the `send` and `do` modes.
- Pays only revenue past the clawback window; a later refund nets against the next payment.
- Checks the payout Limit; above it, opens an Approval and the Action waits.

## 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. | [Commission.pay](/business/nouns/commission/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 commission.
```

**API**

```bash
curl -X POST https://api.sb/routewise.dev/commissions/commission_1/pay \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/routewise.dev",
  "commission": {
    "$id": "https://api.sb/routewise.dev/commissions/commission_1",
    "$type": "Commission",
    "rate": 1,
    "term": 1,
    "clawbackDays": 1
  },
  "transaction": {
    "$id": "https://api.sb/routewise.dev/transactions/transaction_1",
    "$type": "Transaction",
    "kind": "charge",
    "amount": {
      "amount": 25,
      "currency": "USD"
    }
  },
  "action": {
    "$id": "https://api.sb/routewise.dev/actions/action_1",
    "operation": "Commission.pay",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/routewise.dev/actions/action_1"
  }
}
```

**SDK**

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

const { commission, transaction } = await $.Commission.pay({ commission: 'commission_1' })
```

**CLI**

```bash
npx startup-builder do Commission.pay --json '{"commission":"commission_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Commission.pay({ commission: 'commission_1' })"
  }
}
```