create_invoice
Create a customer invoice in GnuCash, with support for custom currency, payment terms, notes, invoice number, and optional job grouping.
Instructions
Create a customer invoice.
Args:
customer_id: Customer ID (e.g., "000001").
date_opened: Date in ISO format (YYYY-MM-DD). Defaults to today.
notes: Optional notes.
currency: ISO currency code. Defaults to the customer's
currency, falling back to the book's default. Pass
explicitly to override.
term: Billterm name (e.g., "Net 30"). Optional.
invoice_id: Custom invoice number (e.g., "INV-2026-001"). If omitted,
auto-generates from the book's invoice counter.
job_id: Optional Job ID. When set, groups the invoice
under the named job. The job must belong to the
same customer and be a customer-job (created
with owner_type='customer'). Use create_job
first to define the job, then attach invoices
to it via this parameter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | ||
| notes | No | ||
| job_id | No | ||
| currency | No | ||
| invoice_id | No | ||
| customer_id | Yes | ||
| date_opened | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |