Overview
Admins can open a specific customer page in PortaBilling and click Preview invoice to see what the customer’s charges would look like when the billing period ends. Invoice Preview simulates billing closure for a customer, calculating all charges, discounts, and taxes, and producing an invoice with a “Preview” watermark (so it won’t be mistaken for a real invoice). It does not affect the customer’s balance or other data. This feature lets your finance and customer service teams:
- Verify charges, discounts, and taxes before invoices are issued
- Check how mid-period changes (e.g., plan upgrades or cancellations) will affect charges
- Give customers clear previews of their upcoming charges
ABC Company uses multiple subscriptions. Midway through the billing period (on June 18), they upgrade their internet plan – replacing the subscription “100 Mbps for $35” with “300 Mbps for $50”.After making this change, ABC Company contacts their service provider because they are unsure how much they will need to pay at the end of the month.
The billing admin opens the customer’s page in PortaBilling and clicks Preview invoice.

Once the admin sees a notification in the upper-right corner, they download the generated file.

By reviewing this invoice, admin verifies that the cancelled and the new subscription have been prorated correctly, and the charge will be $41.50. The administrator can then share this info with ABC Company, showing exactly what they will be charged at the end of the billing period – with no risk of surprises on the actual invoice.
How it works
The feature becomes available in the PortaBilling web interface after the corresponding Add-on Mart module is activated and configured.

When an admin clicks Preview invoice for a specific customer, the process is as follows:
- The request is sent to the Add-on Mart cloud infrastructure (AMCI).
- The AMCI connects to a cloud-based PortaBilling instance that runs the same release version as your production system.
- A copy of the required customer billing data is securely exported from production to this cloud instance.
- On the copied data, the cloud instance performs the standard billing period closure as if it were the invoice date by assessing charges, applying invoice pre-processing rules, assessing taxes, and producing invoices.
- The cloud instance makes the produced PDF file available for download in the PortaBilling web interface. The admin also receives an email notification with a link to download the invoice.
The output is a simulated invoice that shows all charges as if the billing period had already ended. Your production environment remains unaffected, because the calculation is performed on a dedicated simulation instance.
When the simulation finishes, the cloud instance cleans up the imported customer and billing data and deletes the temporary files.
Specifics
- When the Separate invoice for recurring fees option is enabled for a customer, the simulation will still produce a regular invoice for all charges (including recurring fees).
- If you use an external service to assess taxes, you may still be charged by the external service for the tax calculation requests triggered during the simulation.
Limitations
- Simulation of billing period closure for consolidated invoicing is not supported.
- Invoice previews cannot be generated for customers whose invoices and paymentsare processed externally (the corresponding option is enabled on the customer class).
- Invoice preview is not supported for Oracle-based installations.
What it delivers to you
Spot and fix errors before invoices are issued.
What it delivers to the customer
Give large enterprise customers an accurate estimate of upcoming charges and reduce disputes.