ppaperbrainTemplates
Sign inGet started
← All templates
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.

notestringrequired
items[].amountnumberrequired
items[].descriptionstringrequired
reasonstringrequired
company.namestringrequired
company.emailstringrequired
customer.namestringrequired
customer.emailstringrequired
issue_datestringrequired
total_creditnumberrequired
credit_note_numberstringrequired
original_invoice_numberstringrequired

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.