Shahid Malla

WHMCS Invoice Customization: Branded PDFs & Email Templates

Your invoice is the most-seen artifact in your billing. The practical guide to branded PDF templates, tax-compliant fields, customized invoice emails, and on-page invoice views.

S Shahid Malla
· Jan 22, 2026 · 7 min read · 96 views
shahidmalla.com/blog/whmcs-invoice-customization-branded-pdfs-email-templates
WHMCS Invoice Customization: Branded PDFs & Email Templates
On this page (11 sections)

Your invoice is a touch point with the customer that you can't avoid. They open every one. They forward it to their accounting team. They search their inbox for the last one when filing taxes. A polished invoice signals "real business"; a stock WHMCS invoice signals "billing system I haven't bothered to customize."

This is the practical guide to making WHMCS invoices look like part of your brand — without losing tax-required fields or breaking on the next WHMCS upgrade.

The three things to customize (in priority order)

  1. The PDF invoice — what customers download and accountants file.
  2. The invoice email — the message they receive with the PDF attached.
  3. The on-page invoice view — what they see when logged into the client area.

Do them in that order. The PDF is the most-shared artifact; spend the most time on it.

Step 1 — Configure invoice numbering before you customize anything

If you skip this, you can't change it later cleanly. Decide now:

WHMCS Admin → Setup → General Settings → Invoices:

  • Sequential Paid Invoice Numbering: enable. Most jurisdictions require sequential invoice numbers for tax purposes. WHMCS uses two number sets — internal IDs (always sequential) and customer-facing invoice numbers (sequential only if this is enabled). Always enable.
  • Invoice # Format: e.g., INV-{NUMBER} or YOURCOMPANY-{YEAR}-{NUMBER}. Stick with this format from day one.
  • Starting Invoice Number: where to begin counting. If migrating from another system, set this to continue your existing sequence.

Step 2 — The PDF invoice template

WHMCS generates PDFs from a single PHP template: /templates/{your-theme}/invoicepdf.tpl. If you don't have one, the WHMCS-shipped default lives in /includes/pdfgenerator.php — copy it into your theme as a starting point.

Edit /templates/{your-theme}/invoicepdf.tpl. The PDF template uses TCPDF syntax with some Smarty variables. The structure I use:

{*
 * Custom invoice PDF
 * Variables available: $clientsdetails, $invoicenum, $datecreated, $duedate,
 *                      $invoiceitems (array), $subtotal, $tax, $total, etc.
 *}

{* Logo top-left *}
$pdf->Image(ROOTDIR . '/assets/img/invoice-logo.png', 10, 10, 50);

{* Company details top-right *}
$pdf->SetXY(140, 10);
$pdf->SetFont('Helvetica', '', 9);
$pdf->MultiCell(60, 4, 'Your Company Name', 0, 'R');
$pdf->SetXY(140, 14);
$pdf->MultiCell(60, 4, '123 Main Street\nCity, Country\nVAT/Tax ID: ...', 0, 'R');

{* "INVOICE" title *}
$pdf->SetXY(10, 45);
$pdf->SetFont('Helvetica', 'B', 24);
$pdf->Cell(0, 10, 'INVOICE', 0, 1);

{* Invoice metadata table *}
$pdf->SetFont('Helvetica', '', 10);
$pdf->SetXY(10, 60);
$pdf->Cell(40, 6, 'Invoice #:', 0, 0);
$pdf->Cell(0, 6, '{$invoicenum}', 0, 1);
$pdf->Cell(40, 6, 'Issue date:', 0, 0);
$pdf->Cell(0, 6, '{$datecreated}', 0, 1);
$pdf->Cell(40, 6, 'Due date:', 0, 0);
$pdf->Cell(0, 6, '{$duedate}', 0, 1);

{* "Bill To" block *}
$pdf->SetXY(10, 85);
$pdf->SetFont('Helvetica', 'B', 11);
$pdf->Cell(0, 6, 'Bill to:', 0, 1);
$pdf->SetFont('Helvetica', '', 10);
$pdf->MultiCell(85, 5, '{$clientsdetails.firstname} {$clientsdetails.lastname}\n{$clientsdetails.companyname}\n{$clientsdetails.address1}\n{$clientsdetails.city}, {$clientsdetails.state}\n{$clientsdetails.country}');

{* Items table *}
{* ... loop $invoiceitems, format properly ... *}

{* Totals *}
{* ... subtotal, tax, total ... *}

{* Payment instructions / bank details / footer *}
$pdf->SetXY(10, 250);
$pdf->SetFont('Helvetica', '', 9);
$pdf->MultiCell(0, 4, 'Bank: ...\nIBAN: ...\nThank you for your business.', 0, 'L');

Test by viewing any invoice as PDF: WHMCS → Invoices → click an invoice → Download as PDF. Iterate until it looks the way you want.

Step 3 — Professional design checklist

What separates a "looks like WHMCS" PDF from a "real business" PDF:

  • Real logo (vector PNG with transparent background; 300 DPI at print size). Not the default WHMCS placeholder.
  • Consistent font (Helvetica or your brand font; one font, two sizes, two weights — that's it).
  • Adequate white space. Don't cram everything into the top quarter.
  • Itemized table with column alignment (descriptions left, amounts right, decimals aligned).
  • Total in a visually prominent box.
  • Tax breakdown if applicable (VAT %, tax amount, taxable subtotal).
  • Payment instructions if invoices are paid by bank transfer.
  • Footer with your full legal name, company number, and contact email.

Step 4 — Tax-required fields

Depending on jurisdiction, your invoice must include specific information. The common requirements:

  • Your legal business name and address.
  • Your tax ID / VAT registration number.
  • Customer's name and address.
  • Customer's tax ID (for B2B sales in many jurisdictions).
  • Invoice date.
  • Unique sequential invoice number.
  • Description of goods/services.
  • Unit price, quantity, total.
  • Tax rate applied and tax amount.
  • Total amount due.
  • Currency.

For EU sales: VAT-MOSS compliance requires additional fields. For Indian GST: GSTIN, HSN/SAC codes, IGST/CGST/SGST breakdown. Check with your accountant — what's required varies wildly by country.

Step 5 — Customize the invoice email

WHMCS Admin → Setup → Email Templates → Invoice Created. This template is sent when a new invoice is generated. Make it:

  • Friendly tone (you're asking for money; don't be cold).
  • Clear about what they're being charged for (one-line summary above the technical details).
  • Direct link to pay online (uses the Smarty variable {$invoice_link}).
  • PDF attached (toggle in template settings: "Include Invoice PDF").

Template sample:

Subject: Invoice {$invoice_no} for {$client_first_name}

Hi {$client_first_name},

Your invoice for {$invoice_date_created} is ready: {$invoice_amount} due by {$invoice_date_due}.

— {$invoice_summary}

You can pay online here:
{$invoice_link}

The PDF is attached for your records.

Thanks,
{$company_name}

Also customize:

  • Invoice Payment Reminder templates (3, 7, 14 days overdue). Be progressively firmer.
  • Invoice Payment Confirmation — they paid, thank them and confirm details.
  • Credit Card Charge Failure — useful and proactive ("update card here before suspension"). Reduces churn.

Step 6 — The on-page invoice view

The HTML version your customer sees when logged in. WHMCS template: /templates/{your-theme}/viewinvoice.tpl.

Most customization here is CSS — the layout works; it just needs your brand styling applied. Override in your theme's CSS:

/* viewinvoice.tpl content */
.invoice-header { background: #0f172a; color: white; padding: 2rem; border-radius: 12px 12px 0 0; }
.invoice-table thead { background: #f8fafc; }
.invoice-table .amount { font-variant-numeric: tabular-nums; text-align: right; }
.invoice-total-box {
  background: linear-gradient(to right, #dfff4f 0%, #c4e83a 100%);
  padding: 1.5rem; border-radius: 8px;
  font-size: 1.5rem; font-weight: 700;
}

How to verify your invoice setup

  1. Create a test invoice (Admin → Invoices → Add). Use realistic amounts.
  2. Download the PDF. Open it. Does it look like a real-business invoice? Show it to a non-technical person — what's their first reaction?
  3. Send the invoice (right-click → Send Email). Check your inbox. Email subject readable? Attachment present?
  4. Log in as the test customer in client area. View the on-page invoice. Looks branded?
  5. Test on mobile — many customers view invoices on their phone.
  6. Confirm all tax-required fields are present.

Common pitfalls

"Invoice number changes when I move to production." You forgot to set "Starting Invoice Number" or "Sequential Paid Invoice Numbering" before going live. Once invoices have been issued, you can't safely change the sequence.

"PDF looks great on my screen, ugly when printed." WHMCS PDFs render in TCPDF, not a browser. CSS doesn't apply. Visual layout has to be coded in the PDF template, not styled via CSS.

"Multi-currency customers see the wrong currency symbol." WHMCS supports multi-currency but the invoice template must use {$currencysymbol} from the invoice itself, not a hard-coded "$".

"PDF attachment is missing on emails." Email template toggle "Include Invoice PDF" wasn't enabled, or PHP memory_limit too low (PDFs use memory). Bump PHP memory.

"Updates overwrite my PDF template." You edited /includes/pdfgenerator.php directly. Don't. Use the theme override path instead.

My take — invest in this, not in fancier dashboards

I see a lot of hosting businesses spend weeks customizing client-area dashboards that customers visit twice a year, while shipping default-looking WHMCS invoices they see every month. The invoice is your most-seen artifact. It's the asset accountants forward. Make it look like a real business sends it.

Going further


I customize WHMCS invoices for hosting businesses — branded PDF templates, multi-currency, tax-compliant fields, branded emails. Tell me your jurisdiction and I'll send a quote in 24 hours.

Share this article

S

Written by

Shahid Malla

WHMCS expert, full-stack developer, technical lead at Fada.cloud. 10+ years building hosting platforms, custom modules, and automation that ships.

Trusted platforms

Prefer to hire through a platform?

Not sure about working directly? Hire me through Fiverr or Upwork instead - same me, same work, with the platform's buyer protection and escrow.

Got a project like this?

Tell me what you need - I'll send a real quote within 24 hours.