# Disbursements



import Image from 'next/image';

Overview [#overview]

*Disbursements* are a feature that provide a controlled way to return credit amounts to the insured. These credits may arise in circumstances such as:

* Overpayments of invoices
* Cancellations
* Policy changes that reduce premiums
* Shifting from a front-loaded installment schedule such as `fullPay` or `annually` to a more even schedule such as `monthly`

In cases like this, excess credits will accumulate in an account's [Credit Balance](/features/billing/credit-balances) and can then be drawn upon with a payable disbursement.

<Callout>
  An invoice with a negative balance (sometimes called a *Credit Memo*) will not result in an immediate refund to the insured, even though such invoices will be settled immediately upon generation. The purpose of the credit balance is to hold the credit amount so that the refund process can be managed. To automatically return these funds, see the [Excess Credits Feature Guide](/features/billing/excess-credits).
</Callout>

Lifecycle [#lifecycle]

<Image src="/images/disbursement-lifecycle.png" alt="disbursement lifecycle" width={600} height={628} unoptimized />

Disbursements start in `draft` state, and the normal progression is from there to `validated`, `approved`, and finally `executed`.

A disbursement that has become `validated` but hasn't been executed yet may be `reset`, which pulls it back to `draft` state where it can be modified. Only `draft` disbursements can have their `amount` or other data changed.

A disbursement that has been `validated` or `approved` can be explicitly `rejected`, to signify that the disbursement has been disallowed.

Disbursements in `draft` or `validated` state may be `discarded`.

An `executed` disbursement may be `reversed` to reflect that the outgoing payment has become invalid for some reason.

The states `reversed`, `rejected`, and `discarded` are terminal; the disbursement cannot be used after it reaches any of these states.

<Callout>
  Permissions can be used to ensure that proper separation between disbursement creation, modification, and approval is maintained.
</Callout>

Credit Sources [#credit-sources]

Disbursements are structured so that they may draw upon multiple sources. Currently only the Account's [credit balance](/features/billing/credit-balances) and individual invoice items that are credits may be used as a source. If the amounts to draw upon for each source are not specified, then the ones with larger credit amounts will be used first.

<Callout type="warn">
  Disbursements cannot use sources that belong to other customer accounts.
</Callout>

Financial Instruments [#financial-instruments]

The destination for the disbursement can be specified with a <ApiLink name="FinancialInstrumentResponse">financial instrument</ApiLink>, which will be reflected as an <ApiLink name="ExternalCashTransactionResponse">external cash transaction</ApiLink> in the <ApiLink name="DisbursementResponse" />.

<span id="disbursementConfig" />

Configuration and Data Extensions [#configuration-and-data-extensions]

Disbursements can be configured with <ApiLink name="DisbursementRef">different types</ApiLink> and each type can specify a unique structure for [data extensions](/configuration/data-extensions/overview). Disbursements are declared as top-level items in the <ApiLink name="ConfigurationRef">configuration file</ApiLink>.

Accounting [#accounting]

When a disbursement is `approved`, the source or sources of the disbursement will be drawn down (debited) to fund the disbursement (which is a credit). When the disbursement is `executed`, the disbursement will be debited, and the corresponding cash account will be credited. If the sources for the disbursement do not provide sufficient credits to reach the amount of the disbursement, the approval will fail, even if the authorized user has approved the transaction.

If an `approved` disbursement becomes `rejected`, an accounting transaction will revert its funds back to the original sources, and the disbursement will then have a zero balance.

On reversal, both the above transactions will be effectively reversed, such that the amounts drawn from the disbursement sources are restored, and the disbursement itself will remain having a zero balance.

See Also [#see-also]

* [Excess Credits Feature Guide](/features/billing/excess-credits)
* [Disbursements](/api/billing/disbursements)
* [Financial Instruments](/api/billing/financial-instruments)
