# Billing, finance and economic evidence

Model commercial lifecycles, exact money and reviewable financial handoffs with provider and country boundaries kept explicit.

Source snapshot: bcc79fcc27c4d801c2119bef81ddcce7b4e86498

## Choose the correct domain boundary

BillingSpec models commercial parties, catalog/pricing, quotes, orders, invoices, credit notes, payments, reconciliation and related evidence. BillingRuntime supplies deterministic projections over those contracts with an injected tax-calculation port and backend-neutral persistence interfaces. The separate country package and provider integrations handle their specific responsibilities. Start by identifying the exact lifecycle and jurisdictional composition required by the host; a country-neutral operation declaration is not proof of configured production invoicing or payment execution.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/spec/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/finance/runtime/README.md

## Preserve economic history

The billing truth surface normalizes facts into an append-only evidence lifecycle with revision and idempotency checks. Corrections supersede earlier facts while retaining history. FinanceOS validates exact money, entity/tenant isolation, balanced postings, segregation of duties and budget freshness. Consequential work becomes a digest-bound handoff for host approval and execution. This division makes an accounting review reproducible: the reviewer can follow the original fact, its correction lineage and the proposed posting instead of trusting a mutable total.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/spec/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/finance/runtime/README.md

## Respect unit and execution constraints

Finance consolidation is holding-bound and homogeneous in currency and scale. Mixed units need governed conversion evidence and are denied by default in the documented runtime. BillingRuntime defines invoice, credit-note, event-log and invoice-chain ports rather than selecting a database or payment provider. Keep a proposed handoff, an authorized action and a confirmed external effect distinct in product copy and telemetry. Adapter qualification should address replay and ambiguous provider outcomes as well as the successful path.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/spec/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/finance/runtime/README.md

## Trace one commercial transition

Start with a quote or invoice reference and follow the declared operation, lifecycle projection and evidence event. Identify the exact money representation, tenant/company scope and persistence port involved.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/spec/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/finance/runtime/README.md

## Inspect a correction and handoff

Follow a superseding correction into the resulting finance proposal. Check balanced units, required evidence and the Connect authorization reference before considering the handoff eligible for a host executor.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/spec/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/finance/runtime/README.md

## Choose the external boundary

Locate the country and provider adapter used by the intended product. Review its credential, submission, reconciliation and failure responsibilities separately from the portable runtime; qualify that composition in its owning environment.

Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/spec/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md
Source: https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/finance/runtime/README.md

## Packages

- [@lssm-tech/lib.cost-tracking](https://lssm.co/docs/packages/lib.cost-tracking/): API cost tracking and budgeting
- [@lssm-tech/lib.billing-france](https://lssm.co/docs/packages/lib.billing-france/): France-specific BillingOS readiness contracts and deterministic e-invoicing/e-reporting checks.
- [@lssm-tech/lib.crypto-payments-spec](https://lssm.co/docs/packages/lib.crypto-payments-spec/): Provider-neutral crypto wallet governance and HTTP-native agent payment protocol contracts.
- [@lssm-tech/lib.metering](https://lssm.co/docs/packages/lib.metering/): Usage metering and billing core module for ContractSpec applications
- [@lssm-tech/module.billing-os](https://lssm.co/docs/packages/module.billing-os/): CompanyOS composition module for governed BillingOS action plans, authority checks, autonomy classification, and operator inbox routing.
- [@lssm-tech/lib.billing-runtime](https://lssm.co/docs/packages/lib.billing-runtime/): Pure backend-neutral BillingOS runtime helpers for deterministic quote-to-cash lifecycle projections.
- [@lssm-tech/lib.billing-spec](https://lssm.co/docs/packages/lib.billing-spec/): Country-neutral BillingOS quote-to-cash contracts, invariants, and agent action governance types.
- [@lssm-tech/module.finance-os](https://lssm.co/docs/packages/module.finance-os/): Governed FinanceOS application services producing Connect-authorized effect handoffs.
- [@lssm-tech/lib.finance-os-runtime](https://lssm.co/docs/packages/lib.finance-os-runtime/): Deterministic provider-neutral FinanceOS planning, budget, posting, and evidence runtime.
- [@lssm-tech/lib.finance-ops-spec](https://lssm.co/docs/packages/lib.finance-ops-spec/): Provider-neutral internal finance operations contracts beyond BillingOS quote-to-cash.
