Billing & Payments
Receipt
Compact payment receipt — merchant header, itemized purchases, totals, and payment method.
The contract
Fields your API call provides. Amounts and totals are always computed by the caller — templates only format.
| tax | number | required |
| items[].amount | number | required |
| items[].quantity | number | required |
| items[].description | string | required |
| total | number | required |
| paid_at | string | required |
| merchant.name | string | required |
| merchant.address | string | required |
| subtotal | number | required |
| footer_note | string | required |
| payment_method | string | required |
| receipt_number | string | required |
MCP-ready: forks of this template will expose generate_receipt 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": 8.05,
"items": [
{
"amount": 76,
"quantity": 2,
"description": "Marine rope, 50ft"
},
{
"amount": 51.8,
"quantity": 4,
"description": "Brass cleat, 6in"
},
{
"amount": 18.5,
"quantity": 1,
"description": "Teak oil, 1qt"
}
],
"total": 154.35,
"paid_at": "2026-06-10",
"merchant": {
"name": "Harbor Supply Co.",
"address": "412 Dock Street, Portland, ME 04101"
},
"subtotal": 146.3,
"footer_note": "Thank you for your business — returns within 30 days with this receipt.",
"payment_method": "Visa •••• 4242",
"receipt_number": "R-88412"
}'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.