One layer, not ten systems

The complete monetization layer.

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.

Real-time meteringEntitlement enforcementUsage-based billingCredit systemsRevenue ledgersCustomer quotasFeature gatingSubscription orchestrationOverage automationRevenue reportingAlerting & notificationsDurable webhook deliveryAction-level RBACBilling-ops audit trailPrice localizationPricing-insights dashboardFinOps cost & margin reportingMulti-region + warm poolCLI + MCP serverTrace-ID observabilityMeterbox UI ComponentsTyped JavaScript SDKFinancial statementsBilling close automation

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.

Customers list with per-customer plan, MRR, quota used, and status
Built for
AI platforms & inference APIsSaaS with usage-based pricingAPI companiesDeveloper platformsInfrastructure providersB2B software vendorsMarketplace platformsHybrid subscription + consumption
The full stack

Everything Monetization. Nothing else.

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.

Isolated by design

Single-tenant SaaS architecture: your organization gets its own dedicated environment and storage. Your billing and usage data is kept separate from other customers, with no shared databases for that data and no competition for resources. Every connection between our control plane and your environment uses mutual TLS, and data at rest is encrypted with customer-managed keys. This provides strong security, reliable performance, and built-in isolation for compliance and data governance needs.

{ affinity: isolated }
Real-time metering

Ingest token usage events via REST or batch, from your servers or, with a customer token, straight from the browser. 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. Send an `Idempotency-Key` with any API write and a retry returns the first result instead of running twice.

POST /v1/meter
Ingest from anywhere

Point 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/cloudevents
AI-native pricing

Price 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, dimensional plan-price overrides by region, deployment tier, or any key you define, and cost-plus model pricing that follows provider rates with a markup you set, with provider price changes from the public LiteLLM price list proposed for you to confirm.

model_versions + latency_sla
Outcome-based pricing

The 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/outcomes
Entitlement engine

Sub-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/:id
Tamper-Proof Ledger

Every 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/:id
Agent wallets

Per-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/reserve
Credits, Caps & dunning

Promotional 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. Show balances in your own unit, such as Credits or Bits, at a rate you set.

POST /v1/customers/:id/credits
Trials & win-back

Trial 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/trial
Discounts

Percentage-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/coupons
Pricing intelligence

FinOps-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, NDR and GDR retention cohorts, ARR with its quarter-over-quarter and year-over-year growth, revenue goals tracked against actual and projected revenue, deterministic A/B pricing experiments, market packaging benchmarks alongside your own catalog, and feature-adoption data that flags upsell candidates and informs what to build next.

GET /v1/dashboard/pricing-insights
Bring your own billing provider

Stripe 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, multi-year ramps that step the commit and negotiated rates up over the term, and localized pricing by country and currency.

PUT /v1/settings/billing
Quota alerting & durable webhooks

Configurable 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/:id
Billing-ops audit trail

Every 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 calls forward `X-Operator-Id` from `METERBOX_OPERATOR_ID`, and MCP calls are attributed to the agent key that made them, so every action traces back to a specific operator or agent. 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/audit
Granular RBAC

Beyond 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. API keys can be full access, read-only, or read-write, optionally limited to parts of the API, so each integration gets only what it needs.

PUT /cp/rbac/matrix
Period-end close

Automated billing close: we read usage from the in-cluster ledger, calculate overage, add Stripe line items, check that the Stripe invoice totals what Meterbox computed before charging it (a mismatch is held for review), 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. Found a pricing mistake later? Re-rate a closed month and stage each customer's difference on their next invoice.

POST /v1/billing/close
Tax engine

Flexible 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/quote
Accounting export

Keep 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/journals
Revenue anomaly detection

An hourly scan of the ledger and catalog identifies spend spikes (comparing 24-hour cost against the trailing median), churn spikes, aggregation drift (customers whose integration has silently broken), and models priced under your margin floor after a provider raised its price. Results are deduplicated, surfaced in the pricing insights dashboard, and trigger an `anomaly.detected` webhook on first detection.

GET /v1/anomalies
Marketplace bridges

Sell 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
CLI + MCP Server

Connect Claude, ChatGPT, Cursor, VS Code or Codex to your sandbox or production environment with a URL: sign in and approve the connection, or use an agent key. Agents search, describe and run your API through seven tools, limited to the operations reviewed for agent use. In production an agent can only propose changes, which an owner or admin approves one by one. Destructive actions are sandbox-only and blocked unless your billing provider is in test mode, and every write is recorded in the audit log before it runs. Each agent key and connected app has an activity view showing its recent calls, denials and rate-limit hits. `meterbox`, the CLI, generates a command for every API operation from your deployment's live OpenAPI spec.

npm i -g @meterbox/cli
Meterbox UI Components + Customer Portal

`@meterbox/react` drops `<PricingTable>`, `<PlanComparison>`, `<SubscriptionPreview>`, `<CreditBalance>`, `<CreditGrantsTable>`, `<CreditUtilization>`, `<InvoiceHistory>`, and `<UsageChart>` straight into your product. Each widget self-fetches with a short-lived customer JWT, and `<PricingTable>` with a publishable key, so no admin key in the browser. A one-line script embeds your whole pricing page (plans, add-ons, public promotions, FAQ) on any site with a featured plan, free trials and a button per plan, and every plan shows what usage costs: the tokens included, the input and output rates of every model per 1M tokens including any tiered pricing, and what happens past the included amounts. Or skip the wiring entirely with `@meterbox/customer-portal`, a multi-page Account/Plans/Credits portal in one component, where customers download their invoice PDFs, update their card and billing details on Stripe directly, and those who cancel see your retention offers first. Set your logo, colors and font once in Settings, and the embed, every component, the portal, quote links and emails all carry your brand. Backed by `@meterbox/node`, a fully typed JavaScript SDK.

npm i @meterbox/customer-portal
Entitlement JWT Tokens

Access decisions at the edge.
Zero round-trips.

Issue 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.

  • HS256 signed, configurable TTL
  • Auto-refreshed after plan changes or coupon applies
  • Express middleware: requireEntitlementToken(), requireFeature("webhooks"), requireModel("llm-vision")
  • Client-side helpers: 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
  }
)