Installment Fees

Note

This feature requires use of the Payment Schedule Plugin. Enable it before using this feature.

Overview

Installment fees are conditional upon invoices being generated. Using the Payment Schedule Plugin, you can specify one or more installment fees to each installment, and use the plugin logic to determine the amounts and which installments they apply to. If an invoice is not sent (perhaps because of a cancellation or payment schedule change), the fees for those installments will not be generated.

Implementation

To create additional fees for installments, append an installmentFees property to each installment of interest in your installments.js file. For example, after you have created your installment definitions, if you want to charge an extra $3 per invoice, but not including the first invoice for the transaction, you could add the following code:

function createInstallments(data)
{
  let installments = getInstallments(data);

  for (let i = 1; i < installments.length; i++)
  {
    installments[i].installmentFees = [{
      feeName: "installment_fee", /* this type has to be defined in fees.json */
      description: "Fee for extended payments", /* any text goes here */
      amount: 3
    }];
  }
  return { installments: installments };
}
function getInstallments(data) { /* normal installment mechanism here */ }

Fee Generation

Installment fees are not created until the invoice is actually generated based on its issueTimestamp. If there is a policy transaction or payment schedule change that replaces planned invoices, any fee data on those planned invoices will be discarded. Fees may be placed on any new installments created with the plugin.

Note

Installment fees are not visible in the planned invoices set for renewals that have not yet been issued.

Notes

  • Any number of fees can be added to each installment.

  • Each fee’s feeName property must be a fee type declared in fees.json for that product.

  • Fees created as installment fees can be reversed just like other fees.