Create invoice
create_invoiceCreate a new invoice for a customer. Look up the customer with list_customers first. For each line, use list_products and pass the productId when the product is in the catalog; otherwise omit productId and give name, price and quantity for a one-off line. Lines print in the order given. Options left out use the organization's invoice settings where one exists, otherwise none (no discount, tax, shipping or footer). pdfUrl is a private, signed download link that expires at pdfUrlExpiresAt (1 hour). Give it to the user to open or download the PDF; don't put it in emails, notes, or anything that has to keep working.
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": {
"customerId": "<customerId>",
"customerName": "<customerName>",
"items": "<items>"
},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Invoice lines, printed in this order. Mix catalog products and one-off lines freely. | |
| footer | No | Footer printed at the bottom of every page. Plain text or simple HTML (p, br, h1-h3, strong, em, u, s, a, ul, ol, li, span with color or text-align); other markup and scripts are removed. An empty string means no footer. | |
| dueDate | No | Due date as ISO string (no due date if omitted) | |
| taxRate | No | Tax rate value e.g. 10 for 10% or fixed amount (default: 0) | |
| taxType | No | Tax type: PERCENT for percentage-based, FIXED for flat amount (default: PERCENT) | |
| currency | No | Currency code like USD, EUR (from org settings if omitted) | |
| discount | No | Discount as a fixed amount (default: 0) | |
| language | No | Language of the printed labels and title. One of: en (English), de (German), fr (French), es (Spanish), pt (Portuguese), it (Italian), ar (Arabic), zh (Chinese), ja (Japanese), kr (Korean), tr (Turkish), az (Azerbaijani) | |
| template | No | PDF design: regular (Regular), bold-professional (Bold Professional), tech-minimal (Mono), startup-modern (Startup Modern) | |
| issueDate | No | Issue date as ISO string (defaults to today) | |
| projectId | No | Project ID to link the invoice to | |
| customerId | Yes | Customer ID (from list_customers) | |
| dateFormat | No | How dates print. 'Month DD, YYYY' prints December 31, 2025; 'Mon DD, YYYY' prints Dec 31, 2025; 'DD Mon YYYY' prints 31 Dec 2025 | |
| endMessage | No | Note to the customer printed after the totals e.g. 'Thank you for your business!'. Do NOT put payment terms here. | |
| invoiceMode | No | Invoice mode: PRODUCT for goods/services with quantities, HOURLY for time-based billing with hours (default: PRODUCT) | |
| taxIncluded | No | Whether tax is already included in item prices (default: false) | |
| assignedToId | No | Employee ID to assign the invoice to | |
| customFields | No | Additional custom fields as label-value pairs e.g. PO number, project reference, printed in this order | |
| customerName | Yes | The customer's name as returned by list_customers, echoed back for confirmation. The invoice uses customerId. | |
| invoiceTitle | No | Document title printed at the top, e.g. PROFORMA or RECEIPT (defaults to the translated word for 'Invoice') | |
| shippingCost | No | Shipping cost (default: 0) | |
| invoiceNumber | No | Custom invoice number, unique in the organization (auto-generated if omitted) | |
| currencyFormat | No | How amounts print: NARROW_SYMBOL ($1,234.50), SYMBOL (US$1,234.50), CODE (USD 1,234.50), NAME (1,234.50 US dollars), ACCOUNTING (($1,234.50) for negatives) | |
| termsOfPayment | No | Payment terms shown near the top of the invoice e.g. 'Net 30', 'Due on receipt', 'Payment within 14 days'. Do NOT put thank-you messages here. | |
| paymentMethodIds | No | Saved payment method IDs to print on the invoice. Omitted or empty uses the organization's default payment methods. | |
| acceptOnlinePayments | No | Let the customer pay online from the shared invoice link. Defaults to on when the organization has an active online payment connection, otherwise off. |