Skip to main content

Invoice Template

This can be useful, for instance, to show the invoices directly to your customer on the billing section of your website. This document explains how to configure custom invoice templates.

Arthera SMP uses the mustache engine for generating HTML content.

The template needs to be a standalone HTML document that has Mustache directives and placeholders for various variables that Arthera will fill automatically. Because the template must be a standalone HTML document, you need to embed all CSS styles in the HTML and insert images either as Base64 data elements or by using external links.

Invoice Template

Arthera SMP provides the following variables to the invoice HTML template:

accountCustomer account details
account.nameCustomer full name (first name and last name)
account.emailCustomer email address
account.address1Customer address
account.companyNameCustomer company name
account.cityCustomer city
account.stateOrProvinceCustomer state/province
account.postalCodeCustomer postal code
account.countryCustomer country
invoiceInvoice details
invoice.formattedInvoiceDateInvoice date
invoice.formattedChargedAmountInvoice charge amount
invoice.formattedPaidAmountInvoice paid amount
invoice.formattedBalanceInvoice balance
invoice.invoiceItemsInvoice items list
invoice.invoiceItems[].formattedStartDateStart date of invoice item
invoice.invoiceItems[].formattedEndDateEnd date of invoice item
invoice.invoiceItems[].prettyPlanNameDisplay name of the plan
invoice.invoiceItems[].prettyProductNameDisplay name of the product