Billing & Payments
Credit Note
The invoice's undo — credited items, the original invoice reference, and the reason.
The contract
Fields your API call provides. Amounts and totals are always computed by the caller — templates only format.
| note | string | required |
| items[].amount | number | required |
| items[].description | string | required |
| reason | string | required |
| company.name | string | required |
| company.email | string | required |
| customer.name | string | required |
| customer.email | string | required |
| issue_date | string | required |
| total_credit | number | required |
| credit_note_number | string | required |
| original_invoice_number | string | required |
MCP-ready: forks of this template will expose generate_credit_note when the MCP server ships.
Generate it (after you fork & publish)
curl -X POST https://your-paperbrain-host/api/generate/gen_<your-id> \
-H "Content-Type: application/json" \
-d '{
"note": "This credit will be applied to your next invoice. No action is required.",
"items": [
{
"amount": 2400,
"description": "Workshop day — June 3 (cancelled)"
},
{
"amount": 2400,
"description": "Workshop day — June 4 (cancelled)"
}
],
"reason": "Two workshop days cancelled by mutual agreement.",
"company": {
"name": "Northwind Consulting",
"email": "billing@northwind.example"
},
"customer": {
"name": "Acme Corp",
"email": "ap@acme.example"
},
"issue_date": "2026-06-09",
"total_credit": 4800,
"credit_note_number": "CN-0193",
"original_invoice_number": "INV-2041"
}'gen_<your-id>is your generator's id once you fork and publish. The body shown is this template's sample data — the exact shape the contract validates.