The Invoice Options tab of the Payage Configuration page has several options for invoices. After the first invoice is produced, the first two options are no longer shown and you cannot change them.
| Option | Description |
|---|---|
| Invoice number scheme | nnnnnnn - Seven digit sequential nnnnnnnnn - Nine digit sequential YYYYnnnnnn - Year and six digit sequential by year YYYYMMnnnn - Year, month, and four digit sequential by month |
| First invoice number | The sequence number for the very first invoice produced by the system |
| Date format | Choose from several date formats |
| Invoice text | The template for the invoice, including variables from the list below |
| PDF enabled | Set this to Yes to enable the PDF features. After saving, a tick or cross appears, with a tick confirming that your server supports the PDF library. |
| Invoice directory | The name of a directory for saving PDF invoice files. A path beginning with a "/" is an absolute path relative to your computer or your shared server account. A directory not beginning with a "/" is relative to the site root. |
| Always create invoices | If enabled, a PDF invoice file is always created after a successful payment. With this option enabled, buyers will never be able to update their details on the Invoice Request page. |
| Years to keep | Invoice files older than this number of years are automatically deleted. |
| Email invoices | If this (and always create invoices) is enabled, a PDF invoice is emailed to the buyer after a successful payment. |
| Allow simplified invoices | With this option set to Yes, the system will produce invoices with no buyer name or address. With this option set to No, the system will not produce invoices unless it has at least 3 characters of the buyer name and 10 characters of the buyer address. |
Invoices are configured as an HTML formatted single page, with variables that mark the position of the various data items, for example %INVOICE_NUMBER% for the actual invoice number.
The Invoice Text tab of the Payage Configuration page has a text editor that lets you configure the invoice text and formatting. It defaults to a simple invoice with a sample logo. You should edit this to add your own contact details and replace or remove the sample logo. You can, of course, change the format entirely. On multi-language sites you can provide translations for each installed language.
If you need to customise the CSS used by your invoice, you can add your styles to the Custom CSS editor on the Front End Styles page. When an invoice is generated, the payage.css file is loaded, followed by the payage_custom.css file if it is not empty.
The Preview button shows the invoice merged with random values in place of the variables, to help you visualise a real invoice. If the PDF option is enabled, the preview button shows the converted PDF file. If PDF is disabled or not supported, the preview button shows the HTML invoice.
The HTML to PDF conversion supports most HTML elements but there are some limitations. It does not support multi-page tables, SVG images, CSS flexbox, or CSS grid. Images can be included as shown by the default sample invoice, but they must be either in (or below) the site's /media or /images directory. Fonts are limited to Helvetica, Times-Roman, Courier, Zapf-Dingbats, & Symbol.
The email text tab lets you configure the subject and body text for the email that is sent to buyers following a successful payment. Both texts can include any of the invoice variables, for example, the default email subject is "Thank you for buying %PRODUCT%". The PDF invoice file is automatically attached to the email.
The variables tab shows the variables that can be used in Payage invoice text and email text. You can click on a variable to copy it to the clipboard.
| Variable | Description |
|---|---|
| %TRANSDATE% | The transaction date, in the selected format |
| %INVOICE_NUMBER% | Invoice number |
| %TID% | Payage Transaction ID |
| %NAME% | Payer name |
| %EMAIL% | Payer email address |
| %ADDRESS% | Payer address |
| %TAX_ID% | Payer tax ID |
| %TAX_ID_Y% | True if the buyer has a tax ID (includes conditional text for B2B invoices) |
| %TAX_ID_N% | True if the buyer has no tax ID (includes conditional text for B2C invoices) |
| %TAX_TYPE% | This can be the country name, if the application supplies it, or a description supplied by the payment gateway. Stripe supplies this when used in auto-tax mode. |
| %TAX_EXEMPT% | True if the payment is flagged as "Tax exempt" (see below) |
| %TAX_RATE% | The tax rate applied to the transaction, if the application supplies it. It always has a trailing % sign, even if the value is zero. |
| %PRODUCT% | Product name - supplied by all applications |
| %PRODUCT_ID% | Product ID - supplied by some applications |
| %PRODUCT_DESCRIPTION% | Product description - supplied by some applications |
| %PRICE% | Gross price |
| %NET% | Net |
| %TAX% | Tax |
| %FEE% | Fee |
| %GATEWAY% | The payment gateway account name in Payage |
| %PAYMENT_METHOD% | The payment method, for example "Stripe/visa 4242" |
| %IP_ADDRESS% | The buyer's IP address |
| %IP_COUNTRY% | The country determined from the buyer's IP address. |
| %BILLING_COUNTRY% | The billing country as selected by the buyer. |
| %PAYMENT_COUNTRY% | The country returned by the payment gateway. Most gateways provide this, but not all. |
| %JUSER_ID% | Joomla user ID (if logged in) |
| %JUSER_NAME% | Joomla user real name (if logged in) |
| %JUSER_ID% | Joomla username (if logged in) |
| %APP_xxxxx% | Application specific variables. These enable you to retrieve any data item from the Payage payment Application Data. For example, if the payment Application Data has an item "T_NUM_ADULTS" (as Rentalot Plus does), you can retrieve it with the variable %APP_T_NUM_ADULTS%. |
You might need to include some text only if certain fields are populated (or "true"). For example, invoices to businesses (B2B) might need to contain text that isn't used for consumer (B2C) invoices.
Conditional text is enclosed in curly braces. If any variable within the braces evaluates to blank, zero, or not true, the entire contents of the braces, including the braces, is removed from the final text. For example:
{TAX ID: %TAX_ID%}
TAX {%TAX_ID_Y% EXEMPT}{ (%TAX_TYPE%)}
TAX {%TAX_EXEMPT%(Reverse charge applied)}
{%TAX_ID_N% Consumer terms and conditions apply.}
If you have a multilanguage site, the Payage Configuration page has a tab for each installed language, where you can configure the translated text for the invoice text, email subject, and email text.