---
title: "Check billing consistency"
method: GET
path: "/admin/billing/consistency"
tags: ["Billing"]
---

# Check billing consistency

`GET /admin/billing/consistency`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/admin/billing/consistency`
- Auth: API key in header `x-api-key`

Runs a read-only consistency audit across closed ledgers, frozen statement snapshots, billing events, expired billing states, and Stripe invoice snapshots. Empty Admin-bypass static principals are excluded from ordinary state/ledger checks; unexpected billing artifacts remain reportable. It reports issues only and does not repair data or consume credits.

## Query parameters

- `from` string
- `to` string
- `user_id` string
- `period_key` string
- `issue_type` string
- `severity` 'error' | 'info'
- `limit` integer

## Headers

- `x-api-key` string, required

## Response `200`

Billing consistency report

- BillingBillingConsistencyResponseDoc
  - `code` integer
  - `data` BillingBillingConsistencyReportDoc
    - `checked_from` string
    - `checked_to` string
    - `counts_by_severity` object
    - `counts_by_type` object
    - `generated_at` string
    - `issues` BillingBillingConsistencyIssueDoc[]
      - `actual_credits` integer
      - `actual_overage` integer
      - `created_at` string
      - `detail` string
      - `endpoint_breakdown` BillingBillingConsistencyEndpointBreakdownDoc[]
        - `actual_credits` integer
        - `actual_overage` integer
        - `endpoint` string
        - `expected_credits` integer
        - `expected_overage` integer
      - `expected_credits` integer
      - `expected_overage` integer
      - `frozen_at` string
      - `issue_id` string
      - `issue_type` string
      - `period_key` string
      - `repair_method` string
      - `repair_path` string
      - `request_id` string
      - `severity` string
      - `source_updated_at` string
      - `statement_id` string
      - `stripe_invoice_id` string
      - `suggested_action` string
      - `user_id` string
  - `msg` string

## Other responses

- `400`: Invalid query parameters
- `401`: Authentication required
- `403`: Admin plan required
- `500`: Internal server error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/0497899e2016?raw)
