DOCS

PDF donation receipts

> Requires: Fundations Pro

Fundations Pro can attach a real PDF receipt to donation emails. The receipt carries your organisation details, tax or charity number, a sequential receipt number, the donor and donation details, and your logo. It renders from an HTML template through the bundled mPDF library, so it handles Unicode, right-to-left scripts, and complex shaping correctly, which matters for receipts that have to work in any language.

Pdf receipt example

Why use this

Many donors, and most tax authorities, expect a formal receipt as a document, not just an email body. A PDF is something a donor can save and a charity can stand behind. Generating it on the site, attached automatically to the confirmation, means donors get a proper receipt the moment they give, with no manual step for your team.

What it does

When a donation is paid, Pro generates a PDF and attaches it to the relevant email. It hooks into the free get_fund_email_attachments filter, which is the seam the Emails system exposes for exactly this. The receipt is attached to:

  • The global donation receipt email, when the receipt setting for it is on.
  • Per-form payment completed notifications, when that setting is on. See Form notifications and confirmations.

It attaches only for donations that are actually paid, so a failed or pending donation never produces a receipt.

The receipt content includes:

  • Organisation name, address, and logo.
  • Tax or VAT number and charity number.
  • A sequential receipt number with an optional prefix and suffix.
  • Donor name and details.
  • Amount, date, payment ID, and the fundraiser the donation supported.
  • An optional footer note.

Receipt numbering

Receipt numbers are sequential. Pro keeps a counter and assigns the next number when it generates a receipt, then stores that number on the donation so the same donation always shows the same receipt number. You can set a prefix and suffix to match your accounting format.

How rendering works

The receipt is an HTML and CSS template, styled like the emails, rendered to PDF by mPDF. mPDF is bundled with Pro rather than required as a system dependency, and it is loaded only when a receipt is actually being generated, not on every request. Because mPDF does full Unicode with automatic CJK fonts and built-in Arabic and Indic shaping with right-to-left support, the receipt is legible in scripts a hand-rolled PDF writer cannot shape.

The PDF is written to a temporary file in the uploads directory for the duration of the send, then removed on shutdown, so receipts are not left lying around on disk.

How to set it up

  1. Activate and license Fundations Pro.
  2. Go to Fundations > Emails and open the Receipts tab.
  3. Enter your organisation name, address, tax or charity number, and logo.
  4. Set a receipt number prefix and suffix if you use one, and an optional footer note.
  5. Choose where to attach the receipt: the global donation receipt email, per-form payment-completed notifications, or both.
  6. Save.
Receipts settings

What you can and cannot do

You can attach a fully formatted PDF receipt to donation confirmations automatically, in any language, with your branding and tax details and a sequential number. You can pick whether it rides on the global receipt, per-form notifications, or both.

In this version there is no download button on the thank-you page: receipts are delivered as email attachments only. The receipt is generated for paid donations, so there is no receipt for a donation that never completed.

Troubleshooting

No PDF is attached. Check that the receipt setting for that email is on (global receipt, per-form, or both), and that the donation status is paid. A donation that is still pending will not get a receipt.

The receipt has the wrong totals or currency. The receipt reads the donation record and your currency settings. Confirm the donation amount and your currency format under Settings > Donations.

Non-Latin text looks wrong. mPDF embeds and shapes Unicode, but very unusual fonts may need configuration. The bundled setup covers Latin, CJK, Arabic, and Indic scripts out of the box.

Developer reference

SymbolTypeNotes
get_fund_email_attachmentsfilterThe free seam Pro hooks to attach the PDF. Context carries email_key or event plus donation_id.
get_fund_receipt_settingsoptionOrganisation, tax, numbering, and attach settings.
_get_fund_receipt_numberpost metaThe receipt number assigned to a donation.

The generator is Get_Fund_Receipts in the Pro plugin. It builds the layout from a donation ID and the receipt settings, renders through mPDF, and returns the file path to wp_mail() as an attachment.