Receipts
Donation receipt PDF API
Tax-ready donation receipt for nonprofits and fundraising tools. Includes donor details, deductible amount, campaign, and acknowledgement copy. Send this LaTeX template and JSON data to Texify in one /render request.
JSON schema
Fields this template expects.
| Field | Type | Required | Description |
|---|---|---|---|
| receipt_number | string | Yes | Receipt or POS transaction id. |
| merchant | object | Yes | Merchant name, address, and contact details. |
| items | array | Yes | Purchased items with quantity and price. |
| paid_at | string | Yes | Payment timestamp. |
| total | number | Yes | Final paid total. |
API examples
POST LaTeX and JSON. Receive PDF bytes.
cat > donation-receipt-payload.json <<'JSON'
{
"entrypoint": "main.tex",
"resources": {
"main.tex": "\\documentclass[10pt]{article}\n\\usepackage[paperwidth=3.15in,paperheight=8in,margin=0.18in]{geometry}\n\\usepackage{array,booktabs}\n\\pagestyle{empty}\n\\begin{document}\\small\n\\begin{center}\n{\\Large\\textbf{[[ .merchant.name ]]}}\\\\\n[[ with .merchant.address ]][[ . ]]\\\\[[ end ]]\n[[ with .merchant.tax_id ]]Tax ID: [[ . ]]\\\\[[ end ]]\n\\rule{\\linewidth}{0.4pt}\\\\\nReceipt [[ .receipt_number ]]\\\\\n[[ .paid_at ]]\n\\end{center}\n[[ with .donor ]]\\noindent\\textbf{Donor:} [[ .name ]]\\\\[[ .email ]]\\\\[6pt][[ end ]]\n[[ with .campaign ]]\\noindent\\textbf{Campaign:} [[ . ]]\\\\[6pt][[ end ]]\n\\begin{tabular}{>{\\raggedright\\arraybackslash}p{1.35in}rr}\n\\toprule\nItem & Qty & Price\\\\\n\\midrule\n[[ range .items ]][[ .name ]] & [[ .quantity ]] & [[ .price ]]\\\\\n[[ end ]]\\bottomrule\n\\end{tabular}\n\\vspace{0.12in}\n\\begin{flushright}\n[[ with .tax ]]Tax: [[ . ]]\\\\[[ end ]]\n\\textbf{Total: [[ .total ]] [[ with .currency ]][[ . ]][[ end ]]}\n\\end{flushright}\n[[ with .payment ]]\\noindent Paid by [[ .method ]] ending [[ .last4 ]]\\\\[[ end ]]\n\\end{document}"
},
"data": {
"receipt_number": "DON-2026-501",
"merchant": {
"name": "Open Tools Foundation",
"address": "500 Mission St",
"tax_id": "94-1234567"
},
"paid_at": "2026-06-30",
"donor": {
"name": "Priya Shah",
"email": "priya@example.com"
},
"campaign": "Developer education fund",
"items": [
{
"name": "Tax-deductible donation",
"quantity": 1,
"price": 250
}
],
"tax": null,
"total": 250,
"currency": "USD",
"payment": null
}
}
JSON
curl -sS -X POST https://api.texify.dev/render \
-H "Content-Type: application/json" \
--data @donation-receipt-payload.json \
--output donation-receipt.pdfimport json
import requests
payload = json.loads(r'''{
"entrypoint": "main.tex",
"resources": {
"main.tex": "\\documentclass[10pt]{article}\n\\usepackage[paperwidth=3.15in,paperheight=8in,margin=0.18in]{geometry}\n\\usepackage{array,booktabs}\n\\pagestyle{empty}\n\\begin{document}\\small\n\\begin{center}\n{\\Large\\textbf{[[ .merchant.name ]]}}\\\\\n[[ with .merchant.address ]][[ . ]]\\\\[[ end ]]\n[[ with .merchant.tax_id ]]Tax ID: [[ . ]]\\\\[[ end ]]\n\\rule{\\linewidth}{0.4pt}\\\\\nReceipt [[ .receipt_number ]]\\\\\n[[ .paid_at ]]\n\\end{center}\n[[ with .donor ]]\\noindent\\textbf{Donor:} [[ .name ]]\\\\[[ .email ]]\\\\[6pt][[ end ]]\n[[ with .campaign ]]\\noindent\\textbf{Campaign:} [[ . ]]\\\\[6pt][[ end ]]\n\\begin{tabular}{>{\\raggedright\\arraybackslash}p{1.35in}rr}\n\\toprule\nItem & Qty & Price\\\\\n\\midrule\n[[ range .items ]][[ .name ]] & [[ .quantity ]] & [[ .price ]]\\\\\n[[ end ]]\\bottomrule\n\\end{tabular}\n\\vspace{0.12in}\n\\begin{flushright}\n[[ with .tax ]]Tax: [[ . ]]\\\\[[ end ]]\n\\textbf{Total: [[ .total ]] [[ with .currency ]][[ . ]][[ end ]]}\n\\end{flushright}\n[[ with .payment ]]\\noindent Paid by [[ .method ]] ending [[ .last4 ]]\\\\[[ end ]]\n\\end{document}"
},
"data": {
"receipt_number": "DON-2026-501",
"merchant": {
"name": "Open Tools Foundation",
"address": "500 Mission St",
"tax_id": "94-1234567"
},
"paid_at": "2026-06-30",
"donor": {
"name": "Priya Shah",
"email": "priya@example.com"
},
"campaign": "Developer education fund",
"items": [
{
"name": "Tax-deductible donation",
"quantity": 1,
"price": 250
}
],
"tax": null,
"total": 250,
"currency": "USD",
"payment": null
}
}''')
response = requests.post(
"https://api.texify.dev/render",
json=payload,
timeout=90,
)
response.raise_for_status()
with open("donation-receipt.pdf", "wb") as pdf:
pdf.write(response.content)import { writeFile } from "node:fs/promises";
const payload = {
"entrypoint": "main.tex",
"resources": {
"main.tex": "\\documentclass[10pt]{article}\n\\usepackage[paperwidth=3.15in,paperheight=8in,margin=0.18in]{geometry}\n\\usepackage{array,booktabs}\n\\pagestyle{empty}\n\\begin{document}\\small\n\\begin{center}\n{\\Large\\textbf{[[ .merchant.name ]]}}\\\\\n[[ with .merchant.address ]][[ . ]]\\\\[[ end ]]\n[[ with .merchant.tax_id ]]Tax ID: [[ . ]]\\\\[[ end ]]\n\\rule{\\linewidth}{0.4pt}\\\\\nReceipt [[ .receipt_number ]]\\\\\n[[ .paid_at ]]\n\\end{center}\n[[ with .donor ]]\\noindent\\textbf{Donor:} [[ .name ]]\\\\[[ .email ]]\\\\[6pt][[ end ]]\n[[ with .campaign ]]\\noindent\\textbf{Campaign:} [[ . ]]\\\\[6pt][[ end ]]\n\\begin{tabular}{>{\\raggedright\\arraybackslash}p{1.35in}rr}\n\\toprule\nItem & Qty & Price\\\\\n\\midrule\n[[ range .items ]][[ .name ]] & [[ .quantity ]] & [[ .price ]]\\\\\n[[ end ]]\\bottomrule\n\\end{tabular}\n\\vspace{0.12in}\n\\begin{flushright}\n[[ with .tax ]]Tax: [[ . ]]\\\\[[ end ]]\n\\textbf{Total: [[ .total ]] [[ with .currency ]][[ . ]][[ end ]]}\n\\end{flushright}\n[[ with .payment ]]\\noindent Paid by [[ .method ]] ending [[ .last4 ]]\\\\[[ end ]]\n\\end{document}"
},
"data": {
"receipt_number": "DON-2026-501",
"merchant": {
"name": "Open Tools Foundation",
"address": "500 Mission St",
"tax_id": "94-1234567"
},
"paid_at": "2026-06-30",
"donor": {
"name": "Priya Shah",
"email": "priya@example.com"
},
"campaign": "Developer education fund",
"items": [
{
"name": "Tax-deductible donation",
"quantity": 1,
"price": 250
}
],
"tax": null,
"total": 250,
"currency": "USD",
"payment": null
}
};
const response = await fetch("https://api.texify.dev/render", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
signal: AbortSignal.timeout(90_000),
});
if (!response.ok) throw new Error(await response.text());
const pdf = Buffer.from(await response.arrayBuffer());
await writeFile("donation-receipt.pdf", pdf);The template
LaTeX source sent as resources["main.tex"].
\documentclass[10pt]{article}
\usepackage[paperwidth=3.15in,paperheight=8in,margin=0.18in]{geometry}
\usepackage{array,booktabs}
\pagestyle{empty}
\begin{document}\small
\begin{center}
{\Large\textbf{[[ .merchant.name ]]}}\\
[[ with .merchant.address ]][[ . ]]\\[[ end ]]
[[ with .merchant.tax_id ]]Tax ID: [[ . ]]\\[[ end ]]
\rule{\linewidth}{0.4pt}\\
Receipt [[ .receipt_number ]]\\
[[ .paid_at ]]
\end{center}
[[ with .donor ]]\noindent\textbf{Donor:} [[ .name ]]\\[[ .email ]]\\[6pt][[ end ]]
[[ with .campaign ]]\noindent\textbf{Campaign:} [[ . ]]\\[6pt][[ end ]]
\begin{tabular}{>{\raggedright\arraybackslash}p{1.35in}rr}
\toprule
Item & Qty & Price\\
\midrule
[[ range .items ]][[ .name ]] & [[ .quantity ]] & [[ .price ]]\\
[[ end ]]\bottomrule
\end{tabular}
\vspace{0.12in}
\begin{flushright}
[[ with .tax ]]Tax: [[ . ]]\\[[ end ]]
\textbf{Total: [[ .total ]] [[ with .currency ]][[ . ]][[ end ]]}
\end{flushright}
[[ with .payment ]]\noindent Paid by [[ .method ]] ending [[ .last4 ]]\\[[ end ]]
\end{document}Live render
Try sample data now.
Posts this LaTeX template and sample JSON to /render, then opens the returned PDF bytes.
{
"receipt_number": "DON-2026-501",
"merchant": {
"name": "Open Tools Foundation",
"address": "500 Mission St",
"tax_id": "94-1234567"
},
"paid_at": "2026-06-30",
"donor": {
"name": "Priya Shah",
"email": "priya@example.com"
},
"campaign": "Developer education fund",
"items": [
{
"name": "Tax-deductible donation",
"quantity": 1,
"price": 250
}
],
"tax": null,
"total": 250,
"currency": "USD",
"payment": null
}FAQ
FAQ
Can I use Donation receipt as a donation receipt PDF API?
Yes. Copy the LaTeX template, send it in resources with your data to /render, and Texify returns PDF bytes.
Can I change colors, copy, or field names?
Yes. Edit the LaTeX source and JSON placeholders to match your data model and brand before posting to /render.
Does this render real PDF text?
Yes. Texify compiles LaTeX to PDF, so text remains selectable, searchable, and stable across environments.
Related templates
More LaTeX PDF templates.
Receipts
Thermal receipt
Narrow receipt layout for POS, donations, and in-app purchases. Compact typography keeps totals, taxes, and payment details readable on receipt printers.
Letters
Formal letter
Business letter template with sender block, recipient block, subject, body paragraphs, and signature. Good for notices, approvals, and generated correspondence.
Certificates
Course certificate
Elegant completion certificate for online courses, LMS products, and developer education platforms. Designed to print well while keeping verification ids visible.