PDF
business
A5
Payment Receipt
Simple single-page payment receipt with payer name, amount paid, payment method, and reference.
Use Cases
- Post-payment email receipts
- Event ticket payment confirmation
- Service payment acknowledgements
- Subscription renewal receipts
Tags
receipt
payment
confirmation
business
finance
a5
Template Variables
| Variable | Type | Default | Description |
|---|---|---|---|
| company_name | string | Acme Corp | Company name |
| company_logo_url | url | Company logo URL | |
| payer_name | string | Jane Smith | Payer name |
| amount_paid | string | $199.00 | Amount paid (formatted string) |
| payment_date | string | 2026-05-07 | Date of payment |
| payment_method | string | Credit Card | Payment method |
| receipt_number | string | REC-0001 | Receipt reference number |
| description | string | Annual subscription | Description of what was paid for |
| accent_color | color | #16a34a | Accent colour |
API Example
POST to
https://pdf.toolkitapi.io/v1/pdf/from-template
with your template URL and variable values.
curl -X POST "https://pdf.toolkitapi.io/v1/pdf/from-template" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"template_url": "https://toolkitapi.io/static/templates/pdf/receipt.html", "variables": {"company_name": "Acme Corp", "company_logo_url": "", "payer_name": "Jane Smith", "amount_paid": "$199.00", "payment_date": "2026-05-07", "payment_method": "Credit Card", "receipt_number": "REC-0001", "description": "Annual subscription", "accent_color": "#16a34a"}, "page_size": "A5"}'
import httpx, base64
resp = httpx.post(
"https://pdf.toolkitapi.io/v1/pdf/from-template",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"template_url": "https://toolkitapi.io/static/templates/pdf/receipt.html",
"variables": {
"company_name": "Acme Corp",
"company_logo_url": "",
"payer_name": "Jane Smith",
"amount_paid": "$199.00",
"payment_date": "2026-05-07",
"payment_method": "Credit Card",
"receipt_number": "REC-0001",
"description": "Annual subscription",
"accent_color": "#16a34a"
},
"page_size": "A5"
},
)
pdf_bytes = base64.b64decode(resp.json()["pdf"])
with open("result.pdf", "wb") as f:
f.write(pdf_bytes)
const response = await fetch("https://pdf.toolkitapi.io/v1/pdf/from-template", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"template_url": "https://toolkitapi.io/static/templates/pdf/receipt.html",
"variables": {
"company_name": "Acme Corp",
"company_logo_url": "",
"payer_name": "Jane Smith",
"amount_paid": "$199.00",
"payment_date": "2026-05-07",
"payment_method": "Credit Card",
"receipt_number": "REC-0001",
"description": "Annual subscription",
"accent_color": "#16a34a"
},
"page_size": "A5"
}),
});
const data = await response.json();
// data.pdf is a base64-encoded PDF
$body = @{
template_url = "https://toolkitapi.io/static/templates/pdf/receipt.html"
variables = {
"company_name": "Acme Corp",
"company_logo_url": "",
"payer_name": "Jane Smith",
"amount_paid": "$199.00",
"payment_date": "2026-05-07",
"payment_method": "Credit Card",
"receipt_number": "REC-0001",
"description": "Annual subscription",
"accent_color": "#16a34a"
}
page_size = "A5"
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method POST `
-Uri "https://pdf.toolkitapi.io/v1/pdf/from-template" `
-Headers @{"X-API-Key" = "YOUR_API_KEY"} `
-ContentType "application/json" `
-Body $body