Different taxation plug-ins have individual sets of taxation codes that do not always coincide. Therefore, when a service provider switches from one taxation system to another, service management could become cumbersome and lead to misconfigurations (e.g., when an existing customer with one kind of taxation signs up for a product that uses another type of taxation).
To simplify this task, the tax processing logic has been unified as follows:
Taxation for all transactions is defined in PortaBilling using internal tax transaction codes. An internal tax transaction code corresponds to the taxation code of the selected tax plug-in(s). Each set of internal tax transaction codes is unique for the administrator and their resellers.
To illustrate the tax process for customers, consider the following example:
Service provider TATA-Telecom provides voice calls, SMS, and Internet access services to residential customers. They offer different promotions as part of their marketing campaign and provide users with additional products. They also have a range of cloud PBX customers and charge them for their number of active calls.
They have been calculating taxes via taxation company A. However, they have received a better offer from taxation company B and will soon begin to use them to calculate taxes.
To simplify service management and ensure proper taxation for every customer, the administrator creates internal tax transaction codes for every taxation transaction and maps them to the taxation codes of companies A and B.
Then the administrator defines the internal tax transaction codes for each service provided:
- Custom services
- Subscriptions
- Bundle items
- Invoice pre-processing rule
- DID usage
To apply taxes to measured services, the administrator creates a service and defines the tax transaction codes within it.
When customers’ billing periods close, PortaBilling selects company A’s taxation codes for customers that still have that configured as their taxation method and sends them to that company. Likewise, PortaBilling selects and sends company B’s taxation codes to newly added customers.
Thereby the administrator configures taxation for bundle items, subscriptions, invoice pre-processing rules and measured services in a unified manner with just a few mouse clicks.
In summary, the key assets of tax calculation using internal tax transaction codes are as follows:
- Internal tax transaction codes must be specified for each transaction and custom service.
- Internal tax transaction codes must be mapped to each of the taxation plug-in(s’) taxation codes configured in the system.
- Internal tax transaction codes are ignored for customers that have VAT or custom taxation.
- Internal tax transaction codes are unique for administrators and resellers.
- The tax transaction codes are preserved when the administrator clones bundles for the same entity (e.g., when the administrator clones a bundle for their own use). Consequently, once the bundle owner is changed, the tax transaction code will not be cloned and must be defined later (i.e. when the administrator clones reseller A’s bundle and defines reseller B as its owner).



