create_credit_note
Create a credit note to reverse part or all of a posted customer invoice or vendor bill, preserving the audit trail and reducing receivables or payables.
Instructions
Create a credit note against a customer invoice or vendor bill.
A credit note reverses part or all of a posted invoice
while preserving the original posting in the audit trail.
At post time, posting direction reverses: customer credit
notes debit Income / credit A/R (reducing receivables);
vendor credit notes debit A/P / credit Expense (reducing
payables). Settled either by refund (pay_invoice) or
by netting against an outstanding invoice
(apply_credit_note).
Use add_credit_note_entry to add line items, then
post_invoice to post.
Args: owner_id: Customer or vendor ID (e.g., "000001"). owner_type: "customer" or "vendor". Employees are not supported (GnuCash desktop has no UI for employee credit notes; use unpost_invoice + edit on the voucher to amend an employee reimbursement). applies_to_invoice_id: Optional source invoice / bill ID. Must belong to the same owner and use the same currency. Highly recommended for audit trail. Can be omitted for floating credit notes that will be applied later. date_opened: ISO date (YYYY-MM-DD). Defaults to today. notes: Free-text notes (e.g., reason for the credit). currency: ISO currency code. Inherited from source invoice when applies_to_invoice_id is given; otherwise from owner's currency or book default. term: Billterm name. Rarely used for credit notes. credit_note_id: Custom ID. Auto-generated from the shared invoice/bill counter when omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | ||
| notes | No | ||
| currency | No | ||
| owner_id | Yes | ||
| owner_type | Yes | ||
| date_opened | No | ||
| credit_note_id | No | ||
| applies_to_invoice_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |