# create

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

> Creates an Invoice.

Create makes a new [Invoice](/business/nouns/invoice) from the inputs below. It is inherited: every [Noun](/business/nouns/noun) has `get`, `list`, `create`, `update` and `delete`.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `total` | `money` | Yes | The amount due. |
| `due` | `date` | Yes | When payment is due. |
| `paidAt` | `datetime` | No | When it was paid. |
| `collection` | `string` | No | `charge` charges the saved payment method; `send` sends the Invoice and waits for a transfer. `charge` by default. |
| `terms` | `integer` | No | Days from issue until a `send` Invoice is due, such as 30; sets `due`. |
| `purchaseOrder` | `string` | No | The Customer’s purchase order number, printed on the Invoice. |
| `refunded` | `money` | No | The total returned to the Customer, from zero up to the amount paid. |
| `number` | `string` | No | The Invoice number, sequential per Startup and never reused, voided Invoices included. |
| `lines` | `json` | No | Each Offer billed: its quantity, Period and amount, with any Coupon or Credit Grant applied. |
| `pdf` | `url` | No | The Invoice, or its receipt once paid, as a PDF on the Startup’s Domain that names the seller of record. |
| `payUrl` | `url` | No | The page on the Startup’s Domain where the Customer pays it by card or bank transfer. |
| `subscription` | [Subscription](/business/nouns/subscription) | No | The Invoices the Subscription issues, one for each period it renews. |
| `customer` | [Customer](/business/nouns/customer) | No | Each Invoice is owed by one Customer. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `invoice` | [Invoice](/business/nouns/invoice) | Yes | The Invoice. |

## Effects
- Emits `Invoice.created`.
- Two-way: `try`, `send`, `do`.

## 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. | [Invoice.create](/business/nouns/invoice/create) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) 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
Add an invoice to ShiftNote.
```

**API**

```bash
curl -X POST https://api.sb/shiftnote.app/invoices \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"total":{"amount":79,"currency":"USD"},"due":"2026-10-22"}'
```

```json
{
  "api": "https://api.sb/shiftnote.app",
  "invoice": {
    "$id": "https://api.sb/shiftnote.app/invoices/invoice_1",
    "$type": "Invoice",
    "total": {
      "amount": 79,
      "currency": "USD"
    },
    "due": "2026-10-22"
  },
  "action": {
    "$id": "https://api.sb/shiftnote.app/actions/action_1",
    "operation": "Invoice.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/shiftnote.app/actions/action_1"
  }
}
```

**SDK**

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

const invoice = await $.Invoice.create({ total: { amount: 79, currency: 'USD' }, due: '2026-10-22' })
```

**CLI**

```bash
npx startup-builder do Invoice.create --json '{"total":{"amount":79,"currency":"USD"},"due":"2026-10-22"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Invoice.create({ total: { amount: 79, currency: 'USD' }, due: '2026-10-22' })"
  }
}
```

Next: [`Invoice.bill`](/business/nouns/invoice/bill) (in `guide:send-an-invoice`).

Guides that call it: [Send an invoice](/systems/finance/send-an-invoice).