The payment receipt email and branding your Leaky Paywall emails
Leaky Paywall sends a branded payment receipt to your subscribers automatically, and lets you add your logo and brand color to every email it sends. Both are set up under Leaky Paywall > Settings > Emails.
The Payment Receipt email
The Payment Receipt is sent to a subscriber every time a payment is taken, including automatic subscription renewals. It shows the amount, date, plan, payment method, and an invoice number.
On a new Leaky Paywall install this email is on by default. If you are updating an existing site it starts switched off, with a notice in your dashboard, so that you can turn it on when you are ready. To turn it on:
- Go to Leaky Paywall > Settings > Emails.
- Click Payment Receipt Email.
- Tick Enable this email and save.
Turn off your gateway's own receipt. Stripe and PayPal can also email their own receipt for the same payment. Once Leaky Paywall is sending the Payment Receipt, switch the gateway's receipt off so subscribers do not get two. For Stripe, see How to set up receipts in Stripe and untick the successful payment email there.
Editing the receipt
On the Payment Receipt Email screen you can change the subject and the body text. The screen lists the tags you can drop into the body, such as %amount%, %payment_date%, %level_name%, %payment_method% and %invoice_number%. Add a fallback for a tag that might be empty by writing it as %firstname|there%.
Resending a receipt
If a subscriber asks for a copy, go to Leaky Paywall > Transactions, open the transaction, and click Resend Receipt in the sidebar. You can also use the Resend Receipt link that appears when you hover a row in the transactions list.
Adding your branding
Under Leaky Paywall > Settings > Emails, in the Email Settings section, you can set three things that apply to every email Leaky Paywall sends:
- Email Logo: shown at the top of every email. Leave it blank to use your site name instead.
- Accent Color: used for the top border, headings, and links.
- Footer Text: shown at the bottom of every email, a good place for your mailing address. You can use the tags
%sitename%,%siteurl%and%year%in it.
You do not have to set any of these. Emails are sent in a clean default layout until you do.
Sending yourself a test
Each email has a Send Test Email box on its settings screen. Enter an address, click Send Test, and Leaky Paywall sends that email with sample details so you can check how it looks. Save your changes first, the test uses your saved settings.
For developers
The wrapper and the receipt can be adjusted with these filters:
leaky_paywall_use_email_template: return false to send an email without the branded wrapper.leaky_paywall_email_template_html: filter the full wrapped HTML document.leaky_paywall_email_template_accent_color: override the accent color.leaky_paywall_payment_receipt_tags: add or change the values used for the receipt's tags.leaky_paywall_invoice_number: set your own invoice number format.
The Payment Receipt fires the standard leaky_paywall_email_attachments filter with the id payment_receipt, so an extension can attach a PDF.