# confirm

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

> Confirm records the Customer’s sign-off on delivered work, which closes the Order and earns the Startup its fee.

Confirm records the [Customer](/business/nouns/customer)’s sign-off on delivered work, which closes the [Order](/business/nouns/order) and earns the [Startup](/business/nouns/startup) its fee.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The delivered Order. |
| `lines` | `json` | No | The lines confirmed; every delivered line when absent. Each confirmed line bills on its own. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The closed Order. |

## Effects
- Emits [`Order.confirmed`](/business/events/Order.confirmed).
- Performed by the [Delivery Manager](/agents/operations/delivery-manager).
- One-way (money): it waits out its delay window, and runs in the `send` and `do` modes.
- Runs on its own when the acceptance window passes with no dispute.

## 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. | [Order.confirm](/business/nouns/order/confirm) |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | [Order.confirm](/business/nouns/order/confirm) |

## 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
Confirm the latest order.
```

**API**

```bash
curl -X POST https://api.sb/petpantry.shop/orders/order_1/confirm \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/petpantry.shop",
  "order": {
    "$id": "https://api.sb/petpantry.shop/orders/order_1",
    "$type": "Order",
    "total": {
      "amount": 54,
      "currency": "USD"
    },
    "status": "placed"
  },
  "action": {
    "$id": "https://api.sb/petpantry.shop/actions/action_1",
    "operation": "Order.confirm",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/petpantry.shop/actions/action_1"
  }
}
```

**SDK**

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

const order = await $.Order.confirm({ order: 'order_1' })
```

**CLI**

```bash
npx startup-builder do Order.confirm --json '{"order":"order_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Order.confirm({ order: 'order_1' })"
  }
}
```