METERING · FICTIONAL INVOICE INSPECTION

Dunning: retry collection without rebilling

Follow individual meter records into invoice lines, one credit application and a separate collection/refund ledger.

Fictional rates · 1 CU = 100 minor units

Scroll the ledger diagram horizontally to inspect all three columns. Current totals and ledger events also appear as text below.

Your experiment

Set three payment failures and two allowed attempts. Inspect the past-due balance, then allow four attempts. The invoice total and credit application must remain unchanged.

Each observed ledger event takes three inspection seconds. The actual fictional event day is shown on the board. Invoice amounts are frozen at finalization even when later usage arrives.

Finalized invoice lines

LineBillable unitsAmount

Recent ledger events

Offline accounting mechanics with synthetic records and fictional CU rates—not a Stripe integration, Gemini price quote, real invoice, tax calculation or financial advice. Rates are integer minor units per 1,000 metered units. Each usage line and seat proration is rounded to the nearest minor unit, ties away from zero. The period is exactly 30 days; proration uses remaining days. Free input/output allowances are separate. Credits offset the finalized gross once; excess carries forward. Late events are held for another invoice, not billed here. Retry delays are fixed exponential days and create no new invoice. Refunds are separate entries bounded by collected cash and do not reopen the original invoice in this model. No tax, currency conversion, discounts, disputes, partial payments, provider fees or legal billing requirements are modeled. Metering concepts · Proration concepts.

Retry the collection, preserve the debt

This page opens the Collection group. First inspect the default final state: one failed attempt, then a successful collection of 28.60 CU. Set First N attempts fail to three and Maximum collection attempts to two. Seek to the end: the invoice remains 31.60 CU, applied credit stays 3.00 CU, cash collected is zero, and 28.60 CU is past due. Raising maximum attempts to four collects that same debt on attempt four. Neither retry creates another invoice or consumes customer credit again. At a day-32 close the first attempt is day 32.1; the next three are days 33.1, 35.1 and 39.1. Those one-, two- and four-day delays are a synthetic exponential schedule, not issuer behavior or a provider recommendation. The model assumes a definite failure before retry; it does not resolve an ambiguous payment timeout, duplicate webhook or idempotency race.

Compute quantities before currency

This experiment follows synthetic meter records into one finalized invoice and a separate cash ledger. Nothing calls ADK, Gemini or a payment provider. Fixture tenant chooses whose records are accepted; the same event identifier in another tenant must not enter this invoice. Usage quantity multiplier changes every fixture quantity, including late and invalid records. Free input units and Free output units are separate allowances. Input rate and Output rate are fictional integer minor units per thousand billable units. One CU contains one hundred minor units. Each usage line rounds separately to the nearest minor unit, with exact ties away from zero. These are accounting mechanics, not current model prices or measured token usage.

Reproduce the default invoice

Seek to the end with the opening settings. Team A has 3,000 accepted input units and 600 output units. Subtracting 1,000 free input and 200 free output leaves charges of 100 and 60 minor units. Two initial seats cost 2,000; adding two halfway through the thirty-day period adds 1,000. Gross is therefore 3,160, or 31.60 CU. Customer credit reduces the amount collected to 28.60 CU. Include duplicate event fixture adds a repeated delivery; Deduplicate tenant + event ID ignores it. Turn deduplication off and gross rises to 32.80 CU. Disabling the duplicate fixture disables its deduplication switch because there is then no repeated delivery to compare.

Compare arrival cutoff and seat proration

Days of grace after day 30 controls finalization. At two grace days, the day-34 arrival is deferred; at four, it is included, giving 4,200 input units and a 32.58 CU gross invoice. Arrival exactly at the cutoff is processed before finalization in this fixture. Usage, Seats and Collection tabs only expose different controls; hidden groups retain their values. Include seat subscription enables Initial seats, Seats after change, Monthly seat price and Change day. The adjustment is the seat difference times price times remaining days divided by thirty. Set Seats after change to zero at day fifteen: the negative adjustment is 1,000 minor units and gross becomes 11.60 CU. With the subscription disabled, default usage alone costs 1.60 CU. This fixed-day rule is a deliberate simplification of production billing periods.

Separate invoices, credits and cash

Customer credit is applied once at invoice finalization. A credit of 5,000 covers the default gross and carries 1,840 forward, with no collection attempt. First N attempts fail and Maximum collection attempts control cash collection, not invoice creation. Three failures with two allowed attempts leaves 28.60 CU outstanding. Allow four attempts to collect it on the fourth. Requested refund is a separate cash entry: requesting 2,860 minor units after that payment succeeds, while 2,870 is rejected in full. A refund does not erase gross charges or restore customer credit. The fixture omits taxes, discounts, exchange rates, partial payments, disputes, provider fees and invoice corrections. Its retries use synthetic exponential day delays, not a payment-provider retry policy.

Inspect playback and retain evidence

Play and Pause advance or hold inspection time; this is not the fictional billing day shown on the board. Each ledger event occupies three inspection seconds. Next ledger event pauses and advances to the next event. Restart returns to the opening state while retaining parameters. Inspection time seeks directly; Speed selects one quarter, one half, normal or double playback. Parameter changes rebuild a paused experiment so its first event can be inspected. Final preview is explicitly the calculated end result, while the board, invoice lines and event trace follow the selected inspection time. Export fictional invoice JSON includes all settings, events and the final ledger for independent arithmetic checks. Capture baseline stores a comparison; Replace baseline updates it and Clear baseline removes it. Notes persist locally and Export notes downloads observations. Expand experiment enlarges the workspace. On a phone, scroll the diagram horizontally to read its native-size labels; totals and event descriptions remain available as text below.