It’s a standard practice to charge customers a recurring fee for the next billing period. For example, once a month ends, the customer is immediately charged for the upcoming month.

To charge your customers for a subscription in advance, choose “In advance” when creating the subscription. Typically, the number of periods is set to “1” (this is the default value).

Once such a subscription is activated for a user, PortaBilling immediately applies the subscription charges for the current billing period to the user’s balance. When this billing period ends, PortaBilling applies the charge for the subsequent billing period, e.g., the next month.

Example

Say John Doe subscribes to the Internet service on June 1st for a $30 monthly fee. PortaBilling immediately applies the $30 periodic fee for the current billing period (June) to John’s balance.

When June ends, PortaBilling applies the subscription charge of $30 for the subsequent billing period – July. As a result, on July 1st, John receives an invoice with a subscription charge of $60 that covers:

  • the $30 periodic fee for June
  • the $30 periodic fee for July
An “in advance” subscription plan can be activated at any time (e.g., on June 11th). In this case, by default, the subscription fee is prorated so that the customer is charged only for the days of actual service usage (e.g., 20 days covering the period from June 11th to June 30th). You can charge customers a full fee when they sign up for the service in the middle of the billing period. See the Prorated/full periodic fee chapter for details.

On August 1st, John receives an invoice with a subscription charge of $30 for August.

Multi-month prepaid plans with a discount

Link copied to clipboard

To encourage your customers to pay for their subscriptions in advance for more than one billing period, you can offer them multi-month prepaid plans, such as “Pre-pay for 6 months and get 20% off Internet” or “Pay for 11 months and get 12th month free.”

Multi-month prepaid plans are configured within a subscription charged in advance and have the following specifics:

  1. Discount for upfront payment – multi-month prepaid plans allow setting a discount for paying a specific number of months in advance.
  2. Immediate application of prepaid amount – when a user activates a subscription and selects a multi-month prepaid plan, the total amount for these months applies immediately to the user’s balance. For comparison, when a regular in-advance subscription is activated, only the charge for the current month applies immediately, and the charge for the second billing period is applied once the first billing period ends.
    When a user switches to a multi-month prepaid plan within an already active subscription, the total prepaid amount will apply only when the already charged period ends. For example, suppose a user has an active subscription and is charged one month in advance. On July 15th, they decide to switch to a 3-month prepaid plan. Since the user has already been charged for July in advance, the discounted 3-month charge will only apply starting from August 1st.
  3. The “in-advance” period is set in months – in a multi-month prepaid plan, you can set the number of months (not customer billing periods) that should be paid in advance.
Example

On October 1st, John decides to sign up for the IPTV service with a $10 monthly subscription fee. He has three options for paying for the service:

  • Activate a 1-month prepaid plan (no discount);
  • Activate a 5-month prepaid plan and receive a 10% discount: $10*5 - 10% = $50 - $5 = $45 (John can save $5);
  • Activate a 12-month prepaid plan and receive a 20% discount: $10*12 - 20% = $120 - $24 = $96 (John can save $24).

John plans to continue using the service for at least a year, so he chooses the 12-month prepaid plan. Upon activation, the $96 charge is immediately applied to John’s balance. This charge is then reflected on his October invoice.

John does not have to worry about posting timely monthly payments during the prepaid period. He has already been charged for the 12-month period in October, so the next subscription charge will apply in 12 months (on October 1st next year).

Configuration

The multi-month prepaid plans can be configured only for subscriptions charged in advance. In the subscription configuration, you can go to the Multi-month prepaid plans page and set the number of months and a discount value, which can be a percentage (e.g., 20%) or a fixed amount (e.g., $20).

MultiMonthPrepaidPlanConfiguration

Once you set up a prepaid plan for a subscription, you can select it in the Charging period dropdown when assigning a main or add-on product that already includes this subscription. The same dropdown will be available when you assign this subscription to a customer or account directly.

Account_Add-on_MultiMonthPrepaidPlan

Customer_Subscr_MultiMonthPrepaidPlan

Specifics

In case a customer pays for a multi-month prepaid plan, and then decides to cancel their subscription earlier than the prepaid period ends, a credit will be issued for the “unused” subscription time not later than one day after the subscription closes.

The credit for “unused” subscription time will be issued only if you charge a prorated fee for subscriptions canceled in the middle of the billing period.
Benefits
  • Customers can choose to pay for several months in advance to save money.
  • Service providers can improve their cash flow by charging their customers for several months in advance.

Automatic service suspension if unable to charge for subscriptions in advance

Link copied to clipboard

For prepaid customers

Link copied to clipboard

If a prepaid customer doesn’t have sufficient funds to cover all their subscriptions charged in advance, their service can be automatically suspended (this option can be set on the customer class level or for an individual customer). As soon as funds become available, the service is resumed.

If an administrator applies a manual credit to a customer’s balance (their funds become sufficient), the service will only resume once a new billing period begins.
Example

Say John, a prepaid customer, has an active $30 monthly subscription “Triple play bundle” charged in advance. On November 1st, PortaBilling calculates the in-advance subscription charges for November ($30) and compares it with the amount of available funds, e.g.,$20. Since the available funds are insufficient, the customer’s service is immediately suspended.

If John’s service provider configured the subscription not to charge the subscription fee for the days when the services are suspended, PortaBilling recalculates the customer’s subscription charges each day to cover the remaining billing period and compares that with the funds available ($20).

For every day that the customer is suspended, the sum of their subscription charges decreases by the daily fee ($1) because they are not charged for those days. On November 11th, the sum of subscription charges equals the customer’s available funds ($20). PortaBilling charges the customer and resumes their service.

PortaBilling first applies charges for the whole billing period ($30) and immediately issues a credit for 10 days of suspension (10*$30/30 = $10). This credit is applied to the customer’s balance and two xDRs are created: one for the full subscription charge ($30) and another for the waived amount (-$10).

On December 1st, PortaBilling attempts to deduct $30 for December from John's balance, but he has no available funds. PortaBilling suspends service for John.

On December 5th, John makes a $50 payment, so now he has $50 in available funds. Since the customer couldn’t use the service from December 1st to December 5th due to the suspension, the subscription charges are calculated for the period starting from December 5th to December 31st (the last day of the billing period): $30 monthly fee/31 day*27 days=$26.12. This amount is then deducted from the customer’s available funds. The customer’s service is resumed.

Configuration

By default, PortaBilling doesn’t suspend the service if the customer’s available funds are not enough to cover the subscription charge. PortaBilling calculates charges and applies them, even if the charge amount is higher than the available funds (in this case, the balance becomes negative, indicating debt).

If you want PortaBilling to automatically suspend prepaid customers’ service when their funds are insufficient to cover pending subscription charges, you can configure this:

  1. On the customer class level.

    Go to a Customer class > Finances > General info > Status change > Insufficient funds for subscriptions > turn on the Suspend customers toggle.

    CustomerClass_SuspendCustomers

    Then, assign this customer class to each customer.

  2. For an individual customer. Go to Customer > Finances > General info > set the Suspend on insufficient funds for subscriptions option to Yes.

    Customer_SuspendCustomers

    This configuration also works for postpaid customers – if subscription charges push the balance beyond their credit limit, their service will be suspended.
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."

For debit accounts

Link copied to clipboard

To stop providing services to users who have insufficient funds on their debit accounts, configure PortaBilling to automatically block debit accounts when their available funds are insufficient to cover pending subscription charges.

As soon as an account has enough funds to pay for the subscription (either the user tops up the account or the admin applies a manual payment), the account is charged for the subscription and automatically unblocked. Thus, the service becomes available for the user again.

PortaBilling automatically unblocks a debit account as soon as sufficient funds are added to the account to cover the subscription. The administrator should not unblock the account manually. Otherwise, the subscription charges won’t apply even after sufficient funds become available.
Configuration

If you want PortaBilling to automatically block debit accounts when their funds are insufficient to cover pending subscription charges, you can configure this on the customer class level:

Go to Customer class > Finances > General info > Status Change > Insufficient funds for subscription > enable the Block debit accounts toggle. Then assign this customer class to your customers that have debit accounts. CustomerClass_BlockDebitAccounts

By default, when the account is not charged for the days they do not use the service, PortaBilling will apply a full subscription charge and issue a credit for the period during which the account was blocked.

If you disable the Insufficient funds for subscription > Block debit accounts option, the accounts that have already been blocked for insufficient funds will remain blocked. 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.

Advanced features

Link copied to clipboard

Auto-charging for subscriptions

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. This prevents situations when customers don’t have sufficient funds on their balance since the available funds have been spent on the pay-as-you-go charges, e.g., calls or SMS.

This is how it works:

At the end of the billing period, a separate (out-of-turn) invoice is issued for the sum of subscription charges and corresponding taxes. The invoice amount due is automatically deducted from the customer’s credit card, and the amount of available funds on the customer's balance remains unchanged.

This out-of-turn invoice is typically used for administrative accounting and not sent to customers.

If the payment transaction fails (e.g., the credit card has expired or there are insufficient funds on it), the invoice is generated with the amount due equal to the sum of the subscription charges, and a corresponding notification is sent to the customer. At the same time, the amount of available funds remains unchanged because PortaBilling inserts the correction xDR for the amount due on this invoice into the database.

If no payment is received and the invoice becomes overdue, the customer’s service is suspended according to the customer class configuration for out-of-turn invoices.

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.
Example

A prepaid customer, John Doe, has $25 of available funds. Also, he has added his credit card as a payment method via the customer self-care web interface.

On April 1st, John subscribes for a $10 monthly subscription charged in advance.

Upon subscription activation, the in-advance charge for the current billing period ($10 for April) is applied to John’s balance, so the available funds are $15. The charged $10 will be returned to John’s available funds after the successful credit card payment.

During April, John Doe makes international calls for $5, and his available funds are $10.

On May 1st, two separate invoices are produced for John (these invoices are used for internal purposes and are not sent to the customer):

  • An out-of-turn invoice that covers the $20 subscription charge ($10 for April plus $10 for May)
  • A regular invoice that covers $5 for voice calls (since this is a prepaid customer, the invoice has “0” amount due)

The amount due of the out-of-turn invoice ($20) is automatically deducted from John’s credit card upon invoice generation, so the status of the invoice is “paid”.

The initial $10 charge is returned to the customer’s available funds. So it’s now $10+$10=$20.

In May, John makes international calls worth $6. Therefore, his available funds are now $20 - $6 = $14. The invoices produced for him in June are as follows:

  • An out-of-turn invoice that covers the $10 subscription charge for June
  • An invoice that covers $6 for voice calls (since this is a prepaid customer, the invoice has “0” amount due)

Say on May 31st, John’s credit card expires, and therefore, cannot be charged for the amount due of the out-of-turn invoice generated on June 1st. John’s available funds remain unchanged ($14), since the special correction xDR for $10 is inserted into the database.

On June 2nd, John updates his credit card, and the payment transaction for the out-of-turn invoice successfully goes through. Since the invoice is now fully paid, the correction xDR is removed from the database.

If John did not update his credit card, his service would be suspended after the invoice becomes overdue.

Benefits
  • Customers are better able to control their available funds since these funds are only used for pay-as-you-go services.
  • Service providers can improve their cash flow by charging customers automatically.
Configuration

To automatically charge customers for their subscriptions, configure the corresponding customer class as follows:

  1. Go to Customer class > Finances > Invoicing.
  2. Select the invoice template in the configuration of regular and out-of-turn invoices on the corresponding panels.
  3. On the Out-of-turn invoices panel, turn on the Separate invoice for recurring fees toggle.

    Separate invoice for recurring fees toggle

  4. In the out-of-turn invoice configuration:
    1. Specify the period in the Payment terms > Net option. For example, 14 days.
    2. Select the Automatic credit card charge option, e.g., “Upon invoice generation”.

      Out-of-turn invoice configuration

    3. Configure the actions if an invoice is overdue (no payment is received).

      Configure actions if invoice is overdue

Applying subscriptions for several billing periods in advance

Link copied to clipboard

You can charge your customers a few billing periods in advance, e.g., 3 months, by setting the corresponding number of periods when creating the subscription. Once such a subscription is activated for a user, PortaBilling immediately applies the subscription charges for the current billing period to the user’s balance. When this billing period ends, PortaBilling will apply the charges for the specified number of subsequent billing periods, e.g., 3 months.

When the current month ends, PortaBilling adds a charge for another month.

Example

Panda Telecom launches cloud PBX service for a $90 monthly subscription. To improve their cash flow, Panda Telecom charges the subscription fee for three months in advance.

Say a new Panda Telecom’s customer, ABC company, signs up for the cloud PBX service on April 21st. The “$90 (3 months in advance)” subscription is activated for ABC.

The charge for April is immediately applied to ABC’s balance – $30 for 10 days (the period from April 21st to April 30th), and ABC starts using the cloud PBX service.

By default, when a customer signs up for or cancels a subscription in the middle of a billing period, they are charged the prorated periodic fee. You can charge customers a full fee. See the Prorated/full periodic fee chapter for more details.

Once the April billing period closes, PortaBilling additionally applies the subscription charges for 3 months in advance (May, June, and July). On May 1st, ABC receives an invoice with a subscription charge of $300 that covers:

  • $30 for April (the period from April 21st to April 30th)
  • $90 for May
  • $90 for June
  • $90 for July

Once the May billing period closes, PortaBilling detects that ABC has already been charged for two out of three months in advance (for June and July) and applies to ABC’s balance a $90 subscription charge for one more month (August). So, ABC has 3 subsequent months (June, July, and August) covered again.

When another month passes, PortaBilling adds the $90 charge for one month more, so in total, the customer always has three months covered.

On this page

Release
What's new
Admin manuals
Handbooks
Developers documentation
UI help