Skip to main content

Incoming VS Outgoing Invoices

There are two types of Invoices in the system:

  • Incoming
  • Outgoing

An Outgoing Invoice is used to charge a Client entity for the services they used throughout an invoicing period.

An Incoming Invoice is generally used to check whether you as a company are being charged correctly by your carrier/partner.

Outgoing Invoice for a Client will cover Transactions for their origination type calls/SMS/data with a positive rate and termination type calls/SMS/data with a negative one. While an Incoming Invoice will cover negative origination and positive termination for a specific Client.

The logic of statistics selection for the Invoices and xDRs attached to them
  • Outgoing Invoices include items that the customer is charged for, i.e., those with negative cost before Package application.
  • Incoming Invoices include items that the vendor charges us, i.e., those with positive cost before Package application.

Let's review a simple example: the customer has a call that was fully covered by the assigned Package:

In the current implementation, this call will be included both to the Invoice (in the aggregated data that serves as the source for the "Stats" table) and the attached xDR file.