> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valedo.uniwave.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing and metering

> How billable mailboxes are counted and how overage is reported to Microsoft.

> [!WARNING]
>
> **Status: planned.** Mailbox counting and usage reporting are not built yet. Some rules on this page are still open questions for the product owner and are marked as such.

## How a customer is charged

Each month the customer pays the plan's flat base fee, which includes a number of mailboxes. Mailboxes above that number are charged per mailbox through the `additional_mailbox` meter. Microsoft bills the customer and pays the publisher after its agency fee.

## What counts as a billable mailbox

**Open (README §13):** the proposed rule is an enabled user account with an enabled Exchange Online service plan. Shared, room and equipment mailboxes without a licence, and guests, are not counted. The Exchange service plan IDs are configuration, not code.

Valedo counts every tenant once a day and keeps the list of counted user IDs with each count, as evidence if a customer disputes a charge.

## What is reported

* The billing period is the subscription's own term from Marketplace, not the calendar month.
* **Proposed (README §13):** the charge uses the highest daily count in the term.
* Once per term, in the last 24 hours before the term ends, Valedo reports `max(0, peak − included mailboxes)` for `additional_mailbox`. Nothing is reported when the result is 0 or during a trial.
* If the customer cancels or changes plan while the subscription is still active, Valedo reports at once, because Microsoft rejects usage after cancellation.
* Each report is recorded before it is sent, keyed by subscription, dimension and term start. If Microsoft answers that it was already reported, that is treated as success.

## Billing and metering view

`Valedo.Publisher.Finance` and `Valedo.Publisher.Admin` see, per term: the peak count, the overage, the usage events sent and their reconciliation status. A daily job reads back what Microsoft accepted and flags `Rejected` or `Mismatch` events.

* **Manual re-emit:** allowed only inside Microsoft's 24-hour window, and only after a confirmation. Use it when a scheduled report failed.
* **Export:** a per-term export for finance.

## Pricing mirror

`Valedo.Publisher.Admin` keeps a copy of each plan's base fee, per-mailbox fee and included mailboxes, with effective dates, linked to the Partner Center plan ID. The mirror is used for estimates shown to customers. The console warns when the mirror and Partner Center disagree; fix Partner Center first, then the mirror. Included mailboxes belong to a plan and are never edited in place.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.