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.
| tax | number | required |
| notes | string | optional |
| total | number | required |
| bill_to.name | string | required |
| bill_to.email | string | required |
| company.name | string | required |
| company.email | string | required |
| due_date | string | required |
| subtotal | number | required |
| issue_date | string | required |
| line_items[].amount | number | required |
| line_items[].quantity | number | required |
| line_items[].unit_price | number | required |
| line_items[].description | string | required |
| invoice_number | string | required |
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.