# invoices.plans.create

Create a payment plan that splits a project into 2 to 12 installment invoices on set dates, by percentages or exact pre-tax amounts that add up to the subtotal. Each installment is prepared ahead of time and needs approval before it is sent.

`POST /api/v1/accounting/invoices.plans.create`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required

MCP tool: `accounting_invoices_plans_create`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `partyId` | string (ID) | Yes | The ID of a customer or vendor account, from parties.list. |
| `name` | string | Yes | A display name. 1–200 characters. |
| `template` | object | Yes | No other fields. |
| `template.title` | string |  | A short title. at most 200 characters. |
| `template.currency` | string |  | Three-letter currency code, such as CAD or USD. |
| `template.lines` | array of objects | Yes | 1–100 items. |
| `template.lines[].id` | string |  | The record's ID. at most 64 characters. |
| `template.lines[].description` | string | Yes | A short description. 1–500 characters. |
| `template.lines[].quantity` | string |  |  |
| `template.lines[].unitAmountMinor` | string |  | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. Whole number written as a string, may be negative. |
| `template.lines[].isHeader` | boolean |  |  |
| `template.lines[].taxCode` | enum |  | One of: `standard`, `exempt`, `zero_rated`. |
| `template.notes` | string |  | Notes kept with the record. at most 4000 characters. |
| `template.memo` | string |  | at most 4000 characters. |
| `template.paymentMethodIds` | array of strings (ID) |  | A list of record IDs. at most 10 items. |
| `template.taxTreatment` | enum or null |  | One of: `auto`, `hst`, `gst`, `gst_qst`, `zero_rated`, `exempt`, `none`, `custom`. |
| `template.taxRateCode` | enum or string or null |  |  |
| `template.terms` | object |  | No other fields. |
| `template.terms.code` | enum | Yes | One of: `due_on_receipt`, `net_7`, `net_15`, `net_30`, `net_45`, `net_60`, `custom`, `split_50_50`, `monthly`. |
| `template.terms.days` | integer or null |  |  |
| `template.payUrl` | string (uri) or null |  |  |
| `template.projectId` | string (ID) or null |  |  |
| `installments` | array of objects | Yes | 2–12 items. |
| `installments[].date` | string | Yes | A date, as YYYY-MM-DD. |
| `installments[].percent` | string |  | at most 9 characters. |
| `installments[].amountMinor` | string |  | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. Matches ^\d{1,18}$. |
| `installments[].label` | string |  | at most 120 characters. |
| `reviewLeadDays` | integer |  | 0 to 60. |
| `autoSendAfterApproval` | boolean |  | Default `true`. |
| `idempotencyKey` | string | Yes | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/invoices.plans.create \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "partyId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "name": "Synthetic Ventures Inc.",
  "template": {
    "lines": [
      {
        "description": "Synthetic example from the docs",
        "unitAmountMinor": "1250"
      }
    ]
  },
  "installments": [
    {
      "date": "2026-09-30"
    },
    {
      "date": "2026-09-30"
    }
  ]
}'
```

Reference page: https://app.getoatmilk.com/docs/api/invoices.plans.create
