> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.solvimon.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.solvimon.com/_mcp/server.

# get_billing_run

**Live server:** available on `mcp.solvimon.com` as well as on the test server.

The health of a month's billing run in one call: what is done, what is at risk, and what needs a look before you finalize. It never changes anything.

| Parameter                                           | Description                                                      |
| --------------------------------------------------- | ---------------------------------------------------------------- |
| `mode`                                              | `status` (default) or `preflight`                                |
| `period`                                            | Status only. `YYYY-MM`, default the current month                |
| `invoice_date`                                      | Preflight only. The run to check                                 |
| `billing_entity_id`                                 | Limit to one billing entity                                      |
| `detail`                                            | One check key, to list the invoices or customers behind it       |
| `variance_threshold_percent`, `variance_min_amount` | When a change against last month is flagged. Default 25% and 500 |
| `refresh`                                           | Read again instead of the 5-minute cache                         |

**Status** returns an `overall` verdict (`ON_TRACK`, `ATTENTION` or `ACTION`), timeliness, revenue at risk, the next run, a trend of the last six runs, and one row per check:

* **Run progress:** invoices not yet final, empty drafts, stale drafts from earlier runs, failed finalizes, reprocessing.
* **Completeness:** active subscriptions with no invoice this period, usage events that matched no subscription, customers billed for usage who sent none, accepted quotes not yet converted.
* **Correctness:** changes per customer and per product against the previous month, split into volume and price for usage, with customers whose contract changed marked as explained; new and dropped items; credit notes; manual invoices.
* **Data quality:** missing invoice emails, bad addresses, reverse charge without a tax id.
* **Delivery:** failed invoice emails, e-invoices in error or stuck, ERP and export errors, failed webhooks.
* **Collections and prepaid:** overdue invoices, failed payment requests, credit grants expiring with an open balance.

A check that couldn't be read is `UNAVAILABLE` with the reason, and never counts as fine. A check that hit a page limit is marked `partial`. Amounts in different currencies are never added together.

**Preflight** checks a run before a bulk finalize in Desk and returns a `verdict`: `HOLD`, `GO_WITH_WARNINGS` or `GO`. Blockers are a pending reprocess, the grace period not yet passed (with the time it is ready), and tax data. The result lists which drafts are in scope and which are on hold, and why.

**`Billing run status for October`**

```json Billing run status for October
{"period": "2026-10"}
```

**`Which invoices are not final yet?`**

```json Which invoices are not final yet?
{"period": "2026-10", "detail": "not_final"}
```

**`Ready to finalize the 1 November run?`**

```json Ready to finalize the 1 November run?
{"mode": "preflight", "invoice_date": "2026-11-01"}
```