createInvoiceItem
Add a custom item to a draft invoice, or a pending item to a subscription, billed on the subscription's next invoice. Returns the created item. Pass exactly one of invoiceItem.invoiceRef (from getInvoices, a draft) or invoiceItem.subscriptionRef (from getSubscriptions). Leave companyRef and membershipRef out: the owner comes from the invoice or the subscription. product.title is the item title, quantity a whole number, and unitAmount the price of one unit in major units (12.5 is 12.50). Pass tax.rate only to override the location tax rate; it has no effect when the location does not charge tax. The invoice totals are recalculated. Only a draft invoice can get a new item. The route is not idempotent: after a failure or timeout, check the result with the list tool before calling again, or a second record is created. Never invent UUIDs; only use values from prior tool responses.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"invoiceItem": "<invoiceItem>"
},
"name": "createInvoiceItem"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoiceItem | Yes | Invoice line item to create. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoiceItem | Yes |