jBilling comes ‘out of the box’ with simple tax functionality. This means that without any customization, the system can handle the application of very basic taxes through the use of plugins.

One of the ways in which the system can handle simple taxes is to use the CountryTaxCompositionTask plugin, which will automatically assign country specific taxes for all products. The logic for this feature is based on the country code assigned to the customer. Alternatively, it is also possible to add a specific tax to a group of products. This can be done by using the SimpleTaxCompositionTask plugin. This plugin also provides the user with the ability to exempt products and customers from receiving tax. However, depending on how complex the taxes are, this plugin does not provide an easy way to apply taxes based on where the customer lives.

Applying taxes correctly is critical for all industries, but there are many complications when it comes to applying taxes to products and services for Telco. Compliancy is non negotiable, so when customers who reside in the United States are invoiced it can be incredibly time consuming to ensure that taxes are applied correctly. For example, federal, state, and local taxes are applied to all different combinations of services and products. One type of tax a particular customer needs, may not apply to the another. Additional types of taxes include: sales tax, telecommunications excise tax, utility users tax, business and occupations tax, gross receipt tax, and 911 fees.

Many billing systems attempt to handle taxes by using rate tables. The problem with this approach is that it does not take into account the plethora of scenarios a tax engine was built to handle with ease. As jBilling is a highly flexible and extensible system, with a complete API, our approach was to simply integrate with SureTax. This result is that all US taxes are correctly calculated by the tax engine, and are then automatically applied to customer’s invoice by jBilling.


SureTax is the most comprehensive and technologically advanced tax calculation engine on the market, with a commitment to delivering the most robust, reliable tax software solutions in the industry. Both SureTax and jBilling have a robust API, which means that SureTax can handle calculating the correct tax amount and type, while jBilling can continue to function as a billing system by applying the tax item(s) as a line item(s) on the generated invoices.

In order to achieve this integration, jBilling needed to use SureTax’s ability to apply taxes to customers invoices. This meant that jBilling needed some new plug-ins. These new plugins would use SureTax’s web API and interface with the SureTax engine to fetch the appropriate tax lines for generated invoices.


jBilling developed two plug-ins that are integrated with SureTax:


This plugin is used for populating tax lines on an invoice. When activated, it will send a ‘tax quotation request’ to SureTax by making a call to the SureTax API. When jBilling receives the tax information, is added to the invoice as a line item.

Configuration Example:


This plugin is used to send cancellation requests to SureTax in case the invoice is deleted. A cancel request is required by SureTax to update its records about cancellation of any earlier tax quotation request. The plugin intercepts a new event called, BeforeInvoiceDeleteEvent, which is raised just before deletion of an invoice in jBilling. The intercepted event is processed in process method of this plugin to form a cancel request for SureTax. If the cancel request sent to SureTax fails, then the invoice is not deleted in jBilling.

Configuration Example:

Meta Fields

In addition to these new plugins, meta fields are also required, but with a few alterations. We ensured that all the product level meta fields were also made available at the plan level so that taxes are applied appropriately for all services. These meta fields are:

  • Transaction Type Code

  • Tax Exemption Code (applied at customer product and plan level)

  • Regulatory Code.

Customer Zip Codes

There are four zip code fields at the customer level, one is the contact zip code which is part of the customer’s address, and the other three are meta fields. The zip code field must be set with a valid zip code number in order to SureTax to provide the correct tax values. If the zip code is not provided for a customer, SureTax will not provide the required taxes for the customer’s invoice.

The Billing Zip Code Extension, also known as the Plus4 code is a critical component to this integration. It is a 4 digit area zip extension used in conjunction with the 5 digit customer zip code to narrow down and specify the area within the 5 digit zip code area.

Display Taxes on Invoices

It is necessary to also configure an invoice design that will display the appropriate taxes for each customer. In the example below, the invoice template selected is invoice_design, however, it is possible to adjust other existing design formats, or to create a new invoice template.

Learn More

For more information on how jBilling can serve as a complete billing solution for your organization, please contact [email protected].