Add customer class

Link copied to clipboard

With customer classes you can define a set of parameters to be shared among a certain category of customers. For example, you can create two separate classes – one for your retail customers and the other for your business customers, plus define the relevant parameters for each class. After that, you only need to assign the required customer class to all the customers of a given category to ensure that all of them have the same parameters (such as grace period, invoice template, taxation, notification list, etc.)

There is a Default customer class in PortaBilling with default settings. You cannot delete it.

To add a new customer class, click + Customer class and fill in the details. To save the customer class, click Save. To save and continue editing the customer class details, click Save & Edit details. To create more customer classes, click Save & Add a copy.

Create a customer class page

General info

Link copied to clipboard

On this tab, you can configure the general settings for the customers of this customer class, such as the billing period closure mode, periodic xDR export, and status change options.

Name

Link copied to clipboard

Type a unique name for the customer class.

Business model

Link copied to clipboard

Use a business model to categorize customers by the type of service to be provided to them (for example, Cloud PBX, Internet access, etc.).

Currency

Link copied to clipboard

Specify in which currency you charge the customers of this customer class. Note that you can define the currency only when you create the customer class and can’t change it later. Also you can assign this customer class to customers that are charged in the same currency.

If you intend to include customers with different currencies into this customer class, you may leave this field empty. However, fraud protection configuration is disabled for such customer classes since a defined currency is required to monitor a customer’s daily expenses.

Managed by

Link copied to clipboard

Specify the owner of this customer class:

  • Administrator only means that only the administrators can edit and assign this customer class.
  • Reseller name means that the customer class is intended to be used by this particular reseller.

Close the billing period

Link copied to clipboard

Select how PortaBilling closes customers’ billing periods:

  • N hours after it ends – the billing period ends at midnight and is closed after the global delay set on the Configuration web server interface (by default, 6 hours);
  • With a specified delay – the billing period is closed with an additional delay set in the Delay field. Note that the global delay will also be considered.

Rounding method

Link copied to clipboard

Select the rounding method that will be applied to:

  • invoice amounts, and
  • charged amounts for subscriptions, promotional credits or charges, measured services, and DID charges in an individual xDR.

You can select one of the following rounding methods:

  • Away from zero – this rounding method is selected by default. It works similar to rounding up but differs when rounding negative values. Positive and negative values round symmetrically. For example, if the rounding precision is set to two decimals, then:
    • 1.214, 1.215 and 1.216 all round up to 1.22.
    • – 1.214, – 1.215 and – 1.216 all round to – 1.22.
  • Half away from zero – this rounding method works similar to arithmetic rounding but differs when rounding negative values. Positive and negative values round symmetrically. For example, if the rounding precision is set to two decimals, then:
    • 1.214 rounds to 1.21, 1.215 and 1.216 all round to 1.22.
    • – 1.214 rounds to – 1.21, – 1.215 and – 1.216 all round to – 1.22.
  • Special rounding (malaysian) – formerly known as custom rounding. This type of rounding depends on the last decimal at precision point. For example, if the rounding precision is set to two decimals, then:
    • If the last decimal at precision point is [0…2], it is set to zero. For example, 1.204, 1.215 and 1.226 all round to 1.20.
    • If the last decimal at precision point is [3…7], it is set to 5. For example, 1.234, 1.255 and 1.276 all round to 1.25.
    • If the last decimal at precision point is [8…9], it is set to 0 and the previous decimal increases by 1. For example, 1.284, 1.296 all round to 1.30.

Rounding precision

Link copied to clipboard

Define how to present invoice amounts to customers. PortaBilling calculates invoice amounts with five-decimal precision (e.g., 16.89306). PortaBilling rounds invoice amounts to the number of digits you specify here.

The difference between the sum of all the charges and the rounded off invoice amount is written as a separate xDR with the proper (plus or minus) sign.

To select the rounding method for invoice amounts, open the Finances > General info > Rounding method. The Away from zero rounding method is selected by default.

For example, if the Away from zero rounding method is selected and you select to round the invoice amounts to 2 decimals then 16.85306 rounds to 16.86.

Subscriber-to-subscriber transfers

Link copied to clipboard

Allow customers in this customer class to transfer available funds to each other. Only users of debit accounts or credit accounts with individual credit limits can transfer funds to each other.

Status change

Link copied to clipboard

Insufficient funds for subscription

Link copied to clipboard

Instruct PortaBilling to change the status of customers and/or their debit accounts when their funds are insufficient to cover subscription charges.

Suspend customers

Link copied to clipboard

If the customer’s balance or available funds are insufficient to cover all their subscriptions (whether assigned to their credit accounts through a product, directly, or to the customer), you can:

  • Enable the toggle to automatically suspend customer services. When suspended, customers no longer receive the service and therefore no subscription charges are generated. As soon as a customer’s funds are sufficient, PortaBilling resumes their service and generates new charges.

  • Disabled toggle instructs PortaBilling to charge the subscription’s full amount regardless of the current balance status. The customer’s balance may exceed the credit limit or the amount of available funds (in this case the negative value of available funds appears).

    If you disable the automatic suspension, customer records already suspended for insufficient funds will not be reactivated automatically. These records will remain suspended until the customer pays the subscription charge (postpaid customers must also pay any overdue invoices in full) or an admin manually changes the customer status to “Active.”

Block debit accounts

Link copied to clipboard

Control service availability for debit accounts when their balance is insufficient to cover charges for subscriptions assigned to them directly.

  • Turn on the toggle to automatically suspend an account. An account with the Suspended status has no access to services until it has sufficient funds to cover subscription charges. Once the administrator makes a payment or the customer tops up an account, PortaBilling automatically removes the Suspended status, resumes the service for the debit account, and assesses subscription charges.

  • Turn off the toggle to instruct PortaBilling to charge the subscription’s full amount regardless of the current balance status. The account may go into overdraft (in this case the negative value of available funds appears).

    If you disable the Insufficient funds for subscription > Suspend debit accounts option, the accounts that have already been suspended for insufficient funds will remain suspended. They can only be activated after you re-enable the option and the account has sufficient funds to cover the subscription during the next charge attempt.

You can choose to charge end users only for the days when they use the service, see the Credits for period with no service option. In this case, PortaBilling first applies charges for the whole billing period and then issues a refund for the period during which the service was suspended. Thus, PortaBilling produces two xDRs for the end user: one xDR is for the whole subscription charge and another one is for the refund amount.

Permanently terminate customers after provisional termination

Link copied to clipboard

When you manually change the customer’s record status to Provisionally terminated, you need to set the date for Permanent termination. By default, it’s 30 days after the Provisional termination. You will be able to set an earlier date, but the customer’s record cannot be terminated permanently later than 30 days.

If you want to change the default value, turn on the toggle and specify the new default number in the Days after provisional termination field. The minimum value is 1.

For example, say you set 45 days here. When you set the Provisionally terminated status for any customer of this customer class, the default date for Permanent termination will be 45 days after Provisional termination. You will be able to set an earlier date for a specific customer, but a later date will be unavailable.

Periodic xDR export

Link copied to clipboard

Manage xDR export for customers in this customer class.

Export xDRs to a .csv file

Link copied to clipboard

Choose whether to generate xDR reports (exported as .csv files) at the end of the billing period.

You can define which fields are included in the reports made available to customers by configuring a custom report structure in the Configuration server web interface using the CustomXDRReport plugin.

Depending on whether the CustomXDRReport plugin is enabled in the Configuration server web interface, this field appears either as a toggle switch (Enabled/Disabled only) or as a dropdown with additional report type options that define which reports should be available to customers in this customer class (via downloads from the self-care web interface and/or email). When the toggle is enabled, default xDR reports are generated.

The following options are available in the dropdown:

  • Disabled – do not export xDRs.
    In most countries, there is a legal requirement for service providers to maintain call history for a long time. Since xDRs are periodically cleaned up from the database, saving xDRs to files might be the only way to comply with local regulations. Disable xDR export to files only if you have some other means to store call history.

    By default, the generated .csv files are stored indefinitely in the system. To clean up these files after a specific period, go to the Configuration server web interface, select “Yes” for the EnableStatisticsCleanup option, and set the storage period in days in the KeepCustomerReportDays field. For instance, if you set a 365-day storage period, it means that .csv files older than a year will be automatically purged.

  • Default reports only – generate xDR reports for customers using the default set of fields (Account, From, To, Country, Description, Connect Time, Charged amount, Service name, Charged quantity, Service unit). This is the default setting when a new customer class is created.
  • Custom reports only – generate xDR reports for customers using a custom set of fields. The custom report structure is defined via the Configuration server web interface.
  • All reports – generate both default and custom xDR reports for customers.
Only default xDR reports are available from the PortaBilling web interface. To download default xDR reports for a specific customer, open the corresponding customer page, navigate to xDRs > Search xDRs, and open the Archived tab.

Periodic xDR export

Link copied to clipboard

Send the generated .csv files via email

Link copied to clipboard

Specify whether customers receive the files via email:

  • Do not send – customers don’t receive .csv files via email;
  • Summary only – customers only receive xDR summary;
  • All xDRs – customers receive the .csv files with all xDRs.

Invoices

Link copied to clipboard

On this tab, you can define invoicing parameters common for all customers in this customer class.

Create a customer class page, Invoices tab

Regular invoices

Link copied to clipboard

Invoice template

Link copied to clipboard

To enable the generation of regular invoices, select the previously created invoice template that defines the invoice layout design.

Generate a PDF invoice

Link copied to clipboard

Schedule when to generate .pdf invoices for customers. You can optimize system workload and statistics calculation by using different invoice generation modes per customer class.

The invoice generation options are:

  • At the end of the billing period – this is the default option. PortaBilling processes a customer’s xDRs, applies charges (e.g., recurring, DID usage fees, etc.), creates an invoice and generates a .pdf file once their billing period is closed. When the .pdf file for this customer is generated, PortaBilling starts processing xDRs for the next customer and so on. Therefore, it takes longer to process xDRs for all customers, though the .pdf files are quickly available.
  • Postponed, based on resource availability – use this option if you automatically charge customers’ credit cards. PortaBilling creates an invoice and immediately charges a customer’s credit card. PortaBilling begins to generate the .pdf files only once the calculations related to the previous billing period (e.g., xDR processing, statistics) for all customers have been completed. Postponed generation accelerates the payment procedure and evenly distributes the load on the system.
  • On demand – PortaBilling makes all calculations for the customer, creates their regular invoices and saves them to the database. You can access these invoices via the API at any time. PortaBilling doesn’t generate .pdf files unless you explicitly request it. You can generate a customer’s invoice from the customer’s page. On demand invoice generation helps you save hard disk space and decrease the workload on the system by up to 50%, depending on the amount of data.

Send the PDF invoice via email

Link copied to clipboard

Define when to send invoices by email to a customer:

  • Never – customers won’t receive their .pdf invoices by email.
  • Automatically – PortaBilling creates a new invoice for a customer and automatically sends the .pdf copy to them by email.
  • After review and approval by admin – PortaBilling generates the invoice and leaves it open for you to review and approve. During the review you can modify the invoice (e.g., correct the amount and recalculate it). After you approve the invoice, PortaBilling sends the .pdf copy to the customer by email.

Hold for review, days

Link copied to clipboard

Specify the number of days for approving an invoice before PortaBilling sends the .pdf copy to the customer.

This option is available only if you choose the After review and approval by admin in the Send the invoice via email field.

Collection threshold

Link copied to clipboard

For an invoice where the amount owed is smaller or equal to this collection threshold, the customer will not receive the outstanding balance notifications and will not be suspended if the invoice becomes overdue. Find more details here.

You can specify the collection threshold (the value should be more than zero) only if the currency for this customer class is set. If the currency is not set for the customer class, this field is inactive.

Skip billing periods that include only payments

Link copied to clipboard

Turn on the toggle to skip generating invoices for billing periods that include only payment/refund transactions (with no charges or credits/adjustments).

Define terms in

Link copied to clipboard

You can choose to define the time frame within which a customer is expected to make payment in:

  • Days (the default option)
  • Billing periods

Payment terms

Link copied to clipboard

Choose when an invoice becomes due.

  • Due upon receipt – this is the default option. With this option enabled, the invoice generation and due dates are the same.
  • Net – select this option to give your customer a specific number of days/billing periods to pay their invoice before it becomes overdue. The invoice due date is calculated as the invoice generation date plus the specified period. For example, if the invoice generation date is June 1st and you specify 15 days here, it means that on June 16th the invoice becomes due. If the payment is not received, on June 17th the invoice becomes overdue, and the collection process will be initiated.

Notify of the due date in advance, days

Link copied to clipboard

Specify the number of days before an invoice is due that the customer receives a notification. This option is available only if you choose the Net option above and specify the period.

To send several notifications, specify comma-separated values in descending order. For example, “14, 7, 3” means that the customer receives a notification 14, 7, and 3 days before the invoice due date (if the customer pays after the first notification, no further notifications are sent).

Actions if an invoice is overdue

Link copied to clipboard

Configure actions and notifications if payment is past due.

Re-send the invoice after the due date

Link copied to clipboard

Send a notification regarding the overdue invoice to a customer. Specify the number of days after the invoice due date that the customer receives such a notification. An empty field disables these notifications.

You can define several thresholds to send multiple notifications to a customer. Specify values separated by commas and in the ascending format (e.g., 10, 12, 15).

For instance, “0, 7, 14” values mean that the customer receives a notification on the due date and again 1 and 2 weeks later.

Late payment fee per billing period

Link copied to clipboard

You can apply a late payment fee each time a customer’s invoice becomes overdue (the fee is included in the next invoice).

This fee applies immediately when an invoice becomes overdue, so the customer is charged this fee even if they pay the overdue invoice a few hours later.

Suspend the customer

Link copied to clipboard

You can set a specific number of days (or billing periods) after the due date when the service will be suspended due to non-payment. On the suspension date, the customer’s status will change to “Suspended.” When a customer is suspended, their services are blocked though some subscription fees may still apply (this depends on the subscription configuration).

Days/Billing periods after due date

Link copied to clipboard

Specify the number of days (or billing periods) after the due date that the customer becomes suspended. The minimum value is “1”. The empty field means no suspension applies. Note that if you configure service limitation, the period you set here should be the same or larger.

Notify of suspension in advance, days

Link copied to clipboard

Specify the number of days before the suspension date to send a notification to the customer. The value here must be equal to or lower than the suspension period.

Reactivation fee

Link copied to clipboard

You can apply a reactivation fee to the customer each time their services become available upon payment of all overdue invoices after the suspension (that was caused by an overdue invoice). The reactivation fee is applied to the currently open billing period (at the time of re-activation) and is included in the next invoice.

Out-of-turn invoices

Link copied to clipboard

Invoice template

Link copied to clipboard

To enable the generation of out-of-turn invoices, select the previously created invoice template that defines the invoice layout design.

Send the invoice via email

Link copied to clipboard

Define when to send out-of-turn invoices to a customer by email:

  • Never – customers won’t receive their .pdf invoices by email.
  • Automatically – the invoice PDF file will be automatically sent to the customer’s email.

Separate invoice for recurring fees

Link copied to clipboard

You can configure PortaBilling to automatically deduct the subscription fee from customers’ credit cards while the available funds on the customer’s balance remain intact (see Auto-charging for subscriptions).

PortaBilling will produce separate (out-of-turn) invoices that contain only subscription fees and taxes and automatically deducts this amount from the customer’s credit card.

An out-of-turn invoice that contains subscription charges and taxes is paid automatically by a credit card only and cannot be paid manually via the web interface.

To use separate invoices for subscriptions, turn on the Separate invoice for recurring fees toggle.

Payment terms

Link copied to clipboard

Choose when the invoices become due. Terms for payment collection are measured in days.

  • Due upon receipt – this is the default option. In this case, the invoice generation and due dates are the same.
  • Net – select this option to give your customer a specific number of days to pay their invoice before it becomes overdue. The invoice due date is calculated as the invoice generation date plus the specified period.

For example, if the invoice generation date is June 1st and you specify 15 days here, it means that on June 16th the invoice becomes due. If the payment is not received, on June 17th the invoice becomes overdue, and the collection process will be initiated.

Notify of the due date in advance, days

Link copied to clipboard

Specify the number of days before an invoice is due that the customer receives a notification. This option is available only if you choose the Net option above and specify the period.

To send several notifications, specify comma-separated values in descending order. For example, “14, 7, 3” means that the customer receives a notification 14, 7, and 3 days before the invoice due date (if the customer pays after the first notification, no further notifications are sent).

Actions if an invoice is overdue

Link copied to clipboard

Configure actions and notifications if payment is past due.

Re-send the invoice after the due date

Link copied to clipboard

Send a notification regarding the overdue invoice to the customer. Specify the number of days after the invoice due date that the customer receives such a notification. An empty field disables these notifications.

You can define several thresholds to send multiple notifications to a customer. Specify values separated by commas and in the ascending format (e.g., 10, 12, 15).

For instance, “0, 7, 14” values mean that the customer receives a notification on the due date and again 1 and 2 weeks later.

Suspend the customer

Link copied to clipboard

You can set a specific number of days after the due date when the service will be suspended due to non-payment. On the suspension date, the customer’s status will change to “Suspended.” When a customer is suspended, their services are blocked though some subscription fees may still apply (this depends on the subscription configuration).

Days after due date

Link copied to clipboard

Specify the number of days after the due date that the customer becomes suspended. The minimum value is 1 day. The empty field means no suspension applies.

Notify of suspension in advance, days

Link copied to clipboard

Specify how many days before the suspension date to send a notification to the customer. The value here must be equal to or lower than the suspension period.

Taxation

Link copied to clipboard

On this tab, you can configure how to calculate taxes and which taxes apply for the services provided to customers in this customer class.

Create a customer class page, Taxation tab

Notifications

Link copied to clipboard

On this tab, you can assign a notification template to the customer class, override the “From” email address, and set the “Reply-to” email address for customer notifications.

Create a customer class page, Notifications tab

Additional

Link copied to clipboard

On this tab, you can configure self-care interface access settings, assign a fraud traffic profile to the customer class to protect customers from fraudulent activities, and configure how to handle customers’ personal data with respect to the demands of the EU General Data Protection Regulation (GDRP).

Create a customer class page, Additional tab

Docs for
What's new
Admin manuals
Handbooks
UI help
Developers documentation