Invoicing

Overview

Invoicing is the process of taking planned receivables, in the form of installments and creating actual receivables in the form of invoices. As part of this, the installment items from the installments are used to create invoice items on the corresponding invoices.

After being generated (based on the generateTime of the installment), the invoices are eligible to be paid using either payments or by drawing funds from a credit balance.

Structure

Each quote or policy transaction, when invoiced, results in a set of installments that sum to the full amount of the billable charges for that transaction. Each installment is specific to that transaction; installments never contain items that relate to more than one transaction.

When it becomes time to invoice one or more installments, those installments are grouped so that, for example, all installments with common values for generateTime, dueTime etc. are the same for each installment in the group. Then, all the installment items within a group are combined when they have the same charge type and are associated with the same policy element. For example, there may be three installments, with each containing an installment item for premium on a particular vehicle. These three items are combined into a single invoice item that has an amount equal to the sum of the amounts of those items. The generateTime will be adjusted if needed so that it is the start of the day that contains the time.

The installments are updated so that their invoiceLocator refers to the new invoice being generated. Likewise, its installment items are then updated so that their invoiceItemLocator properties are no longer null; each now refers to the locator of the new invoice item that contains its billable amount. In this way, there is tracability for each item on each invoice back to the installments, transactions, and charges that it reflects.

Due Times

Invoices each have a dueTime property, which reflects the time that the invoice is expected to be fully settled, usually by having payments applied. If the invoice remains unsettled after this time, then it is past due, and will invoke delinquency, either by being added to an existing delinquency process or by spawning a new delinquency.

The due time will always be adjusted as needed so that invoices are due at the end of the day for the timezone of the invoice. This is calculated by subtracting 1 millisecond from midnight at the end of the day.

If the configuration property defaultBackdatedInstallmentsBilling is set to deferDueDate and the invoice’s generateTime is in the past, then the dueTime will be advanced by the difference between the generateTime and the current time, so that the expected duration between invoice preseentation and its due time is preserved.

Invoices can become settled, and then unsettled due to a payment becoming reversed. In this case, if the dueTime is in the past, the system will behave as if the invoice had become past due in the usual way.

Invoice Rendering

Invoice rendering (the creation of a document that reflects the contents of the invoice) can be done by configuring a document to be rendered for the account. This includes both document rendering data and metadata, similar to how policy documents are managed.

To generate invoice documents:

From this point forward, invoices generated for the specific accounts will be retrievable via the Fetch Invoice Document endpoint.

See Also