MongoDB's billing FAQ contains an unusually candid sentence: "Cloud usage at the very end of a billing period may appear as a line item on your invoice for the next billing period instead. For example, usage on October 31st may be processed in November." The next sentence gives the reason, which is that "Atlas data transfer, private endpoint, and backup costs depend on your Cloud Service Provider. Due to reporting lag from Cloud Service Providers, usage of these services may be processed in the following days." Atlas runs on AWS, Google Cloud and Azure, so part of what it bills is a quantity another company measured first, and it can't bill that quantity until the other company has reported it.
It matters to MongoDB, because Atlas was "73%, 70% and 66% of our total revenue" for the last three fiscal years, according to the 10-K for the year to January 31, 2026, and "Atlas revenue is recorded on a consumption basis and varies with usage." The first post in this series was about deciding what a unit of usage is, using GitHub Copilot. This one is about deciding when a unit counts, which is a separate problem.
Every event has more than one clock
A usage event carries at least two times: when the usage happened, and when the billing system found out about it. In a seat business the gap barely exists, because the contract is the event. In a metered one the gap is normal, and its size depends on how far the meter sits from the thing it measures. For its own clusters MongoDB is the meter: Atlas, in its billing docs, "charges by the hour for your MongoDB clusters" and "tabulates costs daily". For data transfer and backup it is downstream of a provider whose own figures are provisional for a while; AWS, for one, says it updates its Cost and Usage Report "at least once a day until your charges are finalized".
The same FAQ has a third clock. Resource tags, which customers use to split an invoice by team or project, "reflect your configuration of resource tags at the moment the CSV is generated or the API is invoked," so "if you reconfigure your resource tags within a billing cycle, your invoice reflects only the latest configuration of tags." The quantity is dated by when the usage happened, the invoice line by when it was processed, and the cost allocation by when someone downloaded the report.
MongoDB's published answer is to bill by arrival. Late usage goes onto the next invoice as its own line, and the billing docs say plainly that "a month's billed usage encompasses usage for multiple months" in some cases. The alternatives are to hold October open until the upstream reports settle, which delays every customer's invoice to cover a lag on a few line items, or to reissue October's invoice once they do, which makes no invoice final. Billing by arrival keeps invoices final, but it means an invoice is no longer a statement of one period's consumption, and that matters to anything calculated per period. A Monthly Commitment subscription produces "a monthly invoice for the greater of your usage or your prorated monthly commitment", so October's tail of data transfer, once it lands in November, can count towards November's comparison instead of October's.
Google's Gemini API shows the same lag at a much smaller scale, against a balance instead of a period. Its prepay terms say "Prepay billing is subject to overages during the approximately 10 minute billing pipeline latency," and "long-running tasks like batch mode and agents may continue to consume credits beyond your balance." When that happens, "your service is paused, and your negative balance will be deducted from your next credit purchase." Ten minutes is nothing at a month end, but against a prepaid balance it's enough for an agent to spend money the customer hadn't put in.
Modelling it, on paper
Here's how Atlas's published behaviour would map onto Revenue Cloud Usage Management, going by the public usage-consumption skill and data model notes in the SalesforceLabs repository. As before, this is a thought experiment about the problem, not a claim about how MongoDB bills, and it isn't a configuration guide.
A usage event lands as a TransactionJournal row, which stays Pending until a UsageSummary absorbs it; summaries are then rated into a UsageRatableSummary, and included allowances decrement from entitlement buckets along the way. The periods aren't one setting either: the repo's offline checks include an invariant that billing >= rating > accumulation, so usage is gathered on one cycle, rated on a longer or equal one and billed on a longer or equal one again.
The first design decision for an Atlas-style late event is which date the journal row carries. If it carries the date the data transfer happened, it belongs to October, and October's summaries have to still be open to absorb it when it arrives a few days into November. If it carries the arrival date, it lands in November, which matches what MongoDB tells its customers, but October's rated summary is then a record of what had arrived by the close and not a record of October. What happens to an event that arrives after its period has been closed is the subject of the next post; the skill's short version is that a completed summary "never reopens".
The second decision comes from the upstream report being revised until it's final. If the product side forwards the provider's figure each time it changes, the billing side receives the same day's data transfer more than once, at different quantities, and unless something marks the second figure as a restatement, it reads as more usage. Someone has to decide whether the product sends only the difference, or whether billing keeps the upstream line's identity and nets it, and either way the rule has to exist before the first restated report arrives.
The third lag is inside the billing system itself. The skill warns that "zero pending journals means aggregated, not rated": rating finishes afterwards in separate batch jobs, so the obvious signal that everything has been counted fires too early. It also records that the batch job names changed between releases, so "a hand-written wait keyed to a name matches nothing and reads as 'rating finished' the moment it starts." The skill opens with the general version of the same hazard, "almost every mistake is silent"; a lag nobody waits for is one, because nothing errors and the totals come out short.
So a metered business built on cloud infrastructure has two delays stacked on each other: the provider's report reaching the product, and the product's event reaching a rated, billable amount. MongoDB tells customers about the first one in its FAQ, and the second one is the vendor's own to manage.
When does a period end?
Billing by arrival keeps invoices final, and the price is that the invoice drifts away from the calendar. That's tolerable when the lag is a few days of data transfer, but HubSpot's Customer Agent, the case for the next post, is billed at $0.50 per resolved conversation, and its help centre says "the resolution status is evaluated and set 72 hours after the last visitor response." A conversation whose last message lands in the final three days of a month produces its billable event in the next one, by design. If the invoice was never meant to match the month, what is the customer supposed to reconcile it against?
No comments yet