Invoices

How MonetizeNow decides when an invoice should exist, what goes into it, how preview simulates without persisting state, and how to diagnose when any step in that chain breaks.

Layer 1: Generation Chain

How MonetizeNow resolves bill group → contract → quote → billing schedule before constructing any invoice.

Layer 2: Invoice Composition

Item types evaluated during construction: recurring, usage, min commit, tax, and credits, and how they interact.

Layer 3: Preview & Diagnostics

How preview runs the same logic in non-persistent mode, and the conditions that cause it to return nothing or stall.

How Invoice Generation Works

Invoice generation anchors to the bill group, not the quote. A chain of dependencies must resolve (bill group, contract, quote, billing schedule) and every link must be valid before an invoice is built.

This sequence applies equally to generation and preview. A failure at any step produces the same outcome in both contexts: no invoice.

MonetizeNow traverses this chain on every invoice run. Preview follows the same path without persisting the result.

Bill Group → nextInvoiceDate →

  1. Determine Billing Period
  2. Identify Eligible Contract
  3. Resolve Valid Quote
  4. Match Billing Schedule Period
  5. Construct Invoice Items

→ Invoice Generated

📘

Quote resolution

MonetizeNow selects the quote valid for the resolved billing period, not the most recently modified one. An amendment effective July 1 has no effect on a May invoice. Quote selection is period-driven, not recency-driven.

Each bill group maintains its own invoice cycle independently. An account with two bill groups — a monthly platform subscription and separately billed API usage — produces two distinct resolution chains with no shared dependency.

What an Invoice Can Contain

Once a billing period resolves, invoice items are built by evaluating several component types independently. This is why invoice totals often differ from what appears on the quote.

Item TypeSourceBehaviorPerformance Impact
Recurring chargesQuote → billing scheduleFixed for the period. No additional computation beyond schedule lookup.Low
Usage chargesMetered usage eventsRequires usage data retrieval and pricing model evaluation: tiered, graduated, or per-unit.Medium–High
Min commit adjustmentContract commitment floorAdded when actual usage falls below the committed spend for the period.Medium
Min commit creditPre-paid commitmentOffsets usage charges when pre-purchased credit is available. Evaluated after usage is rated.Medium
TaxTax configuration + billing addressEstimated during preview; finalized on invoice generation. May vary slightly between the two.Low–Medium
Customer creditsAccount credit balanceApplied after invoice construction. Reduces balance due without modifying line items.Low

How Invoice Preview Works

Invoice preview runs against a bill group's current invoicing state and returns what the next invoice would look like, without creating a record or advancing billing state. It's a non-destructive simulation of generation.

📘

Key distinction

Preview doesn't show a draft. It runs the actual billing logic and returns real output. If preview returns nothing, MonetizeNow found nothing to invoice. It's not a rendering problem.

Preview traverses the same resolution chain as generation. Only difference: results are returned, not persisted.

Preview Request (Bill Group) →

  1. Validate Bill Group + Next Invoice Date
  2. Resolve Eligible Contract
  3. Resolve Quote + Billing Schedule Period
  4. Construct Invoice Items
  5. Estimate Tax + Evaluate Credits

→ Return Preview Result (no state change)

After preview completes, nextInvoiceDate stays unchanged and no invoice record is created. Running preview multiple times against the same configuration produces the same result each time.

Why Preview May Return Nothing, Fail, or Stall

Because preview runs the same billing logic as generation, it surfaces the same configuration gaps. Most preview failures are billing state issues, not UI or API errors.

A preview with no result isn't always an error. In most cases, MonetizeNow evaluated the chain and found nothing due. Here are the five most common conditions.

No next invoice date on the bill group

What is happening: Without nextInvoiceDate, there's no anchor point. MonetizeNow can't determine which billing schedule period to evaluate, so it stops.

Check:

  • Bill group has a populated nextInvoiceDate
  • Date format and timezone are valid for your tenant configuration

Bill group is inactive

What is happening: Inactive bill groups are excluded from generation and preview. This eligibility gate fires before any resolution chain evaluation begins.

Check:

  • Bill group status is Active
  • If recently deactivated, this behavior is expected

Billing schedule has no period for the next invoice date

What is happening: Most common cause. Billing schedule ends before nextInvoiceDate, typically after a contract term ends without renewal or a fixed-term schedule has elapsed.

Check:

  • Billing schedule includes a period covering nextInvoiceDate
  • Renewal quote has been accepted and generates a continuing schedule

No contract is eligible for the invoice date

What is happening: Contract has ended or renewal hasn't become invoiceable yet. Common during renewal gaps where the prior contract is finished and the new one starts in two weeks.

Check:

  • Contract start/end dates cover the next invoice date
  • Renewal contract start date aligns with or precedes the next invoice date

All charges resolve to zero

What is happening: Discounts, credits, or pre-paid commitments fully offset the invoice. If zero-value invoice generation is suppressed in your tenant, preview returns nothing.

Check:

  • Discount configuration on the quote
  • Outstanding credit balance applied to the account

Did this page help you?