Skip to main content
An invoice plan is one change to a policy’s invoices: the invoices it voids and the invoices it creates, applied together or not at all. Every door that invoices a policy applies a plan, whether a quote’s bind builds it or you send it yourself (Invoicing a policy).

Why invoices add up to billing

A policy’s billing, its fullTermBillingInfo, is what the policy collects and pays out, per line item: premium, taxes and fees in (receivable lines), and payables such as broker or program commission out (payable lines). It states what is owed, free of invoices. Invoices schedule each line: when each part is billed or paid, and to whom. So the two never disagree: a policy’s active invoices add up to its billing, per line item, to the cent. Each line distributes on its own, so premium in four quarterly shares beside a fee billed once on the first invoice is one billing and four invoices. A policy with no invoices meets the rule too: invoices are optional until they exist. Billing states dollars; a plan states cents, so a line of "amount": 1200 is 120000 cents across its invoices.

The shape

An empty plan (no voids, no creates) is valid: it keeps every invoice and creates none.

Kept and voided

A plan names what it voids. Every active invoice it does not name is kept, and kept invoices count toward the total, so the invoices you create bill only what the kept ones leave. Active means not voided and not deleted. An invoice with payments, paid or partially paid, cannot be voided: the policy transactions and the invoice batch refuse the plan with 422 LIVE_PAYMENTS, and a quote’s plan names the invoice it cannot void. Keep it; it counts toward its lines. To change what it covers, credit the line on a new invoice.

Credits

Credits follow the billing, in either of two forms:
  • A negative amount on an existing line. When a change leaves less owed on a line than kept invoices bill (a cancellation of a paid policy, say), a create bills the difference as a negative amount on the same line. With invoicing enabled this works even for a line the new billing no longer states, such as a paid tax a flat cancellation drops: a line a kept invoice carries conserves at zero, so the credit takes it back to zero.
  • A billing line of its own. State the credit in fullTermBillingInfo as its own line, with a negative amount, such as a return premium. It has its own line item type, so its own invoice types and schedule, and its invoices credit it like any other line.
The rule holds either way: kept and new invoices add up to the billing on every line.

Version checks

Each void names the headJournalId it read. If any invoice the plan voids changed since (a payment, an approval, another plan), the whole plan is refused with 409 finv2-invoice-head-conflict and nothing is saved, so a stale plan fails instead of overwriting a payment. Read the policy’s invoices again with GET /api/v1/companies/{companyId}/financials/invoices?linkedPolicy={policyId} and rebuild the plan from their current headJournalId. A plan saved on a quote is checked again when the quote binds, against the invoices current then.

Where a plan goes

Refusals

A refused plan saves nothing. Each message names its fix, and any path it names carries your request’s ids. Codes and statuses are the contract; messages may be reworded. Quote invoicing covers a quote’s settings, generating and endorsement handling.