# Billing Holds



import Image from 'next/image';

Overview [#overview]

Billing Holds are available to prevent the system from initiating or continuing automatic invoicing and delinquency processes that should not be made for certain accounts in the system. These are implemented using <ApiLink name="HoldResponse">Hold</ApiLink> objects. These are created and managed as needed to reflect the onset and eventual conclusion of any desired hold states.

Lifecycle [#lifecycle]

The lifecycle of a hold looks like this:

<Image src="/images/billing_hold.png" alt="billing hold" width={600} height={293} unoptimized />

Holds can be created in `draft` state and then `validated`, but won't have an effect until you explicitly activate them.

When a hold should no longer be in effect, you can explicitly release or discard it.

Validation [#validation]

Unlike other entities where extension data is used, validation as it pertains to billing holds is focused on two basic checks:

* Does the target account of the hold exist?

* Are there any existing `active` or `validated` holds for the given target type (`invoicing` or `delinquency`) and target account?

Similar to other entities, if a hold is created in `draft` state, it can be advanced to later states as long as it passes validation.

Invoice Holds [#invoice-holds]

When a hold exists for an account with `targetType` equal to `invoicing`, then invoices will not be created for that account. The relevant installments will remain in uninvoiced state until the hold is released or discarded.

<Callout>
  Invoices that have already been generated will remain and can become past due. To prevent the delinquency from proceeding, create a delinquency hold in addition to the invoicing hold.
</Callout>

Delinquency Holds [#delinquency-holds]

If an account has a hold with `targetType` equal to `delinquency`, then:

* Any new delinquencies will be created in `preGrace` state, and they will not proceed, and the grace period will not commence.
* Existing delinquencies that are `inGrace` will revert to `pregrace` state and act as if the delinquency had not yet commenced.

When it comes time to release the delinquency hold, the grace period can be adjusted so that the policy will lapse at an appropriate time if it remains delinquent.

See Also [#see-also]

* [Billing Holds API](/api/billing/holds)
