Modern software monetization is fragmented: billing in one system, quotas in another, feature access hardcoded into apps, usage tracking a custom pipeline, reporting stitched together from invoices, spreadsheets, and webhooks. MeterBox is the most comprehensive monetization layer, exposed through APIs and designed to run directly in the critical path of your application.
Whether you charge per prompt, token, API call, seat, workflow execution, compute minute, storage volume, or through a hybrid model, you get the primitives to implement and evolve your strategy without rebuilding your infrastructure every quarter. Everything is API-first, programmable, compliant, and infrastructure-grade.

From pricing to billing and beyond, we take care of the entire monetization process. Deploy in our cloud or your own environment, tell us a little about your pricing strategy and we handle the rest.
Single-tenant SaaS architecture: your organization gets its own dedicated environment and storage. Your data is kept separate from other customers, with no shared databases and no competition for resources. This provides strong security, reliable performance, and built-in isolation for compliance and data governance needs.
{ affinity: isolated }Ingest token usage events via REST or batch. Each event writes the in-cluster ledger (the authoritative meter), deduplicated on `transaction_id` and recorded without ever blocking your inference path. Late events backfill into the right historical period and auto-reconcile at the next close.
POST /v1/meterPoint your existing event stream at MeterBox without a translation layer: CloudEvents 1.0 (binary, structured, or batched), a Segment destination, an Airbyte destination, a long-lived Kafka consumer, or S3/GCS/Azure bucket sweeps can all be mapped directly to meter events through dotted-path field mapping, with the same deduplication and idempotency guarantees as the native API.
POST /v1/meter/cloudeventsPrice what AI actually does: `per-model_version` price bands (charge claude-3.7 differently from claude-3.5), latency-SLA premiums for sub-500ms responses, custom billing dimensions (`gpu_seconds`, `training_cycle_seconds`, `storage_gb`) with their own tier ladders, and dimensional plan-price overrides by region, deployment tier, or any key you define.
model_versions + latency_slaThe top of the pricing ladder: claim a billable outcome ("ticket resolved", "campaign sent") priced from your catalog. It bills only after you confirm it, or when its verification window closes undisputed. Disputed claims void without charge. A confirm/dispute step — not an attribution algorithm — is what makes outcome pricing practical: you verify the outcome happened instead of having to prove causation. Turn on advanced outcome pricing for a self-serve catalog editor, volume-discount tiering, and a customer-portal view of their own claim history.
POST /v1/meter/outcomesSub-millisecond quota checks from an in-memory cache. Model access gates, plan feature flags, configuration entitlements (per-plan scalar values like `support_sla_hours`), grace periods between soft-alert and hard-block, overage policies (block, throttle, or bill), JWT tokens embedding full entitlement state, and an in-process Node SDK (`@meterbox/entitlement-sidecar`) with stale-while-error so your gateway stays live through API outages.
GET /v1/entitlements/:idEvery usage event, subscription charge, overage, credit, and discount becomes a ledger entry, and each closed billing period is sealed with a verifiable SHA-256 digest, so a finalized period that was altered is detectable (SOC 1 ICFR ledger immutability). Monthly statements with day-by-day running balances and per-model breakdowns. Revenue recognition (ASC 606 / GAAP) derives deferred vs recognized revenue straight off the same ledger.
GET /v1/ledger/:idPer-agent (sub-customer) credit wallets with their own balance, spending limits, and budget caps. Manage each AI agent's budget independently under a single account. Credits are temporarily set aside before use and then either charged or returned, preventing overspending even when multiple requests happen at the same time. Unused reservations are automatically released if a client disconnects or fails to complete a request.
POST /v1/wallets/:id/reservePromotional and paid credit grants with priority and expiry ordering, balance-low webhooks, off-session auto-recharge, and credit notes for finalized invoices. Per-customer spend caps return HTTP 402 before a runaway agent can burn through the budget, and a configurable dunning policy moves past-due customers from retries to escalation.
POST /v1/customers/:id/creditsTrial entitlements grant access to a richer plan for a specified number of days without modifying the underlying subscription. This includes reverse trials, which begin with full access and subsequently step down to the original plan. The cancellation flow presents plan-configured retention offers (for example, discounts, trial extensions, or downgrades), allowing the churn screen to attempt user retention before processing the cancellation.
POST /v1/customers/:id/trialPercentage-off and fixed-amount coupons with once, repeating, or forever durations. Plan restrictions, max redemptions, expiry dates, and automatic promotion code sync with Stripe.
POST /v1/couponsFinOps-grade cost visibility: a COGS-aware margin view (revenue vs. provider cost by model), pricing simulations that replay real usage against a draft price book, NRR and GRR retention cohorts, deterministic A/B pricing experiments, and market packaging benchmarks alongside your own catalog.
GET /v1/dashboard/pricing-insightsStripe and Zuora out of the box, or Custom Invoicing for a BYO-ERP flow where your finance system owns issuance and collections against MeterBox-computed totals. Per-customer billing profiles let you override provider, currency, payment terms, and invoice numbering for tailored contracts, supporting seat-based billing, contract commitments with minimum-spend true-ups, and localized pricing by country and currency.
PUT /v1/settings/billingConfigurable alerts can be triggered at 80%, 90%, 100%, or custom absolute token thresholds, with per-period deduplication to prevent duplicate notifications. Events are delivered via HTTP POST or AWS SQS with at-least-once delivery guarantees, exponential backoff retries, and a replayable delivery log, ensuring that downstream outages never result in lost events.
GET /v1/alerts/:idEvery plan, customer, and credit mutation is captured in a queryable audit trail with before/after diffs and actor attribution, including per-individual operator attribution for shared admin keys. CLI and MCP clients forward `X-Operator-Id` from `METERBOX_OPERATOR_ID`, ensuring every action is attributable to a specific operator. Audit records are protected by a tamper-evident SHA-256 hash chain. Filter by event, target, and time, explore activity in the dashboard, or export to your SIEM.
GET /v1/auditBeyond the built-in Owner/Admin/Member roles, each organization defines a configurable capability matrix that authorizes privileged actions independently. This enables fine-grained delegation. For example, billing operations staff can issue account credits without also receiving permissions to publish plans. Capabilities are assigned individually rather than inherited from broad roles, while Owners always retain unrestricted access to all capabilities.
PUT /cp/rbac/matrixAutomated billing close: we read usage from the in-cluster ledger, calculate overage, add Stripe line items, finalize invoices, mark ledger entries paid, and check coupon durations. Opt-in finance approval gate holds invoices at ready-to-issue until a human signs off.
POST /v1/billing/closeFlexible tax handling for invoices and credit notes: use built-in jurisdiction rates for on-prem and air-gapped deployments, or connect Avalara or Anrok for automated tax calculation. A single quote endpoint lets you preview exactly what will be applied before closing, and credit notes automatically handle both net and tax amounts.
POST /v1/tax/quoteKeep your ledger as the source of truth. Invoices, payments, credit notes, and tax entries are projected into your general ledger through an NDJSON stream or NetSuite/Xero import CSVs, mapped to your accounting structure. Lazy projection means no duplicated state and no sync drift.
GET /v1/accounting/journalsAn hourly scan of the ledger identifies spend spikes (comparing 24-hour cost against the trailing median), churn spikes, and aggregation drift, such as customers whose integration has silently broken. Results are deduplicated daily, surfaced in the pricing insights dashboard, and trigger an `anomaly.detected` webhook on first detection.
GET /v1/anomaliesSell through AWS, GCP, and Azure Marketplaces without giving MeterBox access to your cloud credentials. Lightweight entitlement bridges operate in records-only mode: your seller-side handler validates marketplace events and POSTs the resolved entitlement data to MeterBox. MeterBox then maps lifecycle events to customer status and makes the customer immediately available for metering.
/v1/integrations/*-marketplace`meterbox`, the CLI, and `@meterbox/mcp`, an MCP server for AI coding agents, both auto-generate their commands and tools directly from your deployment's live OpenAPI spec — no hand-written wrappers to fall out of sync as the API grows. Both share `@meterbox/ops` for admin-API access and spec-driven operation discovery, so a plan edit, customer lookup, or billing close is one command or one agent tool call away, with every action attributed to the operator behind it.
npm i -g @meterbox/cli`@meterbox/react` drops `<PricingTable>`, `<PlanComparison>`, `<SubscriptionPreview>`, `<CreditBalance>`, `<CreditGrantsTable>`, `<CreditUtilization>`, and `<UsageChart>` straight into your product. Each widget self-fetches via the customer-portal endpoints with a short-lived customer JWT, so no admin key in the browser. Or skip the wiring entirely with `@meterbox/customer-portal`, a multi-page Account/Plans/Credits portal in one component. Backed by `@meterbox/node`, a fully typed JavaScript SDK.
npm i @meterbox/customer-portalIssue a signed JWT that contains the customer's full entitlement state: plan, features, model access, quota limits, overage policy, and any active coupons. The API gateway we provide to you verifies the token locally, with no database lookups or network calls required.
requireEntitlementToken(), requireFeature("webhooks"), requireModel("llm-vision")hasFeature(), canUseModel(), getQuota()// Your AI gateway, no DB call needed
import { requireEntitlementToken, requireModel }
from 'meterbox/middleware'
app.post('/v1/chat',
requireEntitlementToken(),
requireModel('llm-smart'),
async (req, res) => {
const { quota, overage_behavior } = req.entitlements
// quota.input_tokens_per_month = 10_000_000
// overage_behavior = "bill"
// → full entitlement state, zero latency
}
)