ppaperbrainTemplates
Sign inGet started
← All templates
Billing & Payments

Invoice

Classic itemized invoice — parties, line items, totals, and payment terms.

The contract

Fields your API call provides. Amounts and totals are always computed by the caller — templates only format.

taxnumberrequired
notesstringoptional
totalnumberrequired
bill_to.namestringrequired
bill_to.emailstringrequired
company.namestringrequired
company.emailstringrequired
due_datestringrequired
subtotalnumberrequired
issue_datestringrequired
line_items[].amountnumberrequired
line_items[].quantitynumberrequired
line_items[].unit_pricenumberrequired
line_items[].descriptionstringrequired
invoice_numberstringrequired

MCP-ready: forks of this template will expose generate_invoice 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 '{
    "tax": 0,
    "notes": "Net 30. Wire details on file.",
    "total": 50000,
    "bill_to": {
      "name": "Acme Corp",
      "email": "ap@acme.com"
    },
    "company": {
      "name": "Eigenomic",
      "email": "billing@eigenomic.com"
    },
    "due_date": "2026-07-09",
    "subtotal": 50000,
    "issue_date": "2026-06-09",
    "line_items": [
      {
        "amount": 18500,
        "quantity": 1,
        "unit_price": 18500,
        "description": "AI operating system — discovery & architecture"
      },
      {
        "amount": 28500,
        "quantity": 1,
        "unit_price": 28500,
        "description": "Custom agent build (practice area 1)"
      },
      {
        "amount": 3000,
        "quantity": 12,
        "unit_price": 250,
        "description": "Onboarding & training"
      }
    ],
    "invoice_number": "EIG-1042"
  }'

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.