> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korint.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How billing works

> Korint automatically calculates and manages invoices for your customers.

The Korint platform handles premium calculation, billing and payment collection for all of its live policies.

## Invoice object

Invoices contain, but are not limited to:

* The date of issuance
* The period covered by the invoice
* The list of invoiced items, with a detailed breakdown of fees and taxes for each item

See [here](/api-reference/view-specific/list-invoices-on-customer) for the API reference.

## Invoice lifecycle

Invoices will automatically move through different statuses as part of the Korint platform's processing. An invoice is generally linked to a payment, meaning
an attempt to charge the customer. Find out more about payment statuses [here](../payments/overview#payments-lifecycle)
Generally, the lifecycle will be as follows:

* An invoice is always created in the **DRAFTED** status.
* The invoice becomes **ISSUED** as soon as it is drafted. Once an invoice is issued, it appears in the customer's list of invoices and a payment charge is attempted for that invoice.
* Once a payment provider has picked up the charge attempt, the invoice becomes **PAYMENT\_IN\_PROGRESS**.
* The invoice's status will update depending on the payment provider's updates about the payment processing. If the payment succeeds, the invoice becomes **PAYMENT\_SUCCEEDED**.
  If the payment fails, the invoice becomes **PAYMENT\_FAILED**. The invoice will also become **PAYMENT\_DISPUTED** if the end customer opens a dispute on the payment.
  A payment failure or dispute can lead to [further action](/concepts/payments/manage-unpaid-invoices).
* Optionally, at any time, you can change the status of an invoice to **INVOICE\_CANCELLED**.

Some invoices might be negative, indicating that the customer should be reimbursed. In that case the statuses will be slightly different, find out more about [refunds](../payments/overview#refunds).

### Invoice statuses

The following table describes all possible invoice statuses and their transitions:

| Status                | Description                                                                                         | Next Possible States                         |
| --------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| `DRAFTED`             | Invoice created but not yet sent to customer                                                        | `ISSUED`, `CANCELLED`                        |
| `ISSUED`              | Invoice sent to customer, awaiting payment                                                          | `PAYMENT_IN_PROGRESS`, `CANCELLED`           |
| `PAYMENT_IN_PROGRESS` | Payment processing has started                                                                      | `PAID`, `PAYMENT_FAILED`, `PAYMENT_DISPUTED` |
| `PAID`                | Payment received                                                                                    | `PAYMENT_DISPUTED`, *Terminal state*         |
| `PAYMENT_DISPUTED`    | Payment disputed by end customer.                                                                   | *Terminal state*                             |
| `PAYMENT_FAILED`      | Payment failed                                                                                      | `RECONCILED`, *Terminal state*               |
| `REFUND_IN_PROGRESS`  | Refund invoice currently in progress.                                                               | `FINALIZED`, `PARTIALLY_FINALIZED`           |
| `PARTIALLY_FINALIZED` | Only a partial reimbursement was completed.                                                         | *Terminal state*                             |
| `FINALIZED`           | Invoice was reimbursed                                                                              | *Terminal state*                             |
| `RECONCILED`          | In the case of smart reimbursement, this invoice was taken into account in a reimbursement invoice. | *Terminal state*                             |
| `REFUND_NOT_HANDLED`  | Refund could not be handled because of a payment provider limitation.                               | *Terminal state*                             |
| `WRITTEN_OFF`         | Invoice was replaced by another one with added fees.                                                | *Terminal state*                             |
| `CANCELLED`           | Invoice cancelled manually                                                                          | *Terminal state*                             |
