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

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.
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 }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/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/cloudeventsAdd customers the moment they sign up in your app. Send each signup, change, and deletion to one endpoint in your own event's shape, and Meterbox creates, updates, or archives the customer and answers at once, with no transform service in between. Point a few fields at your event, or send the plain shape and keep the defaults. And bring the ones you already have: a CSV or JSON export from your CRM, a spreadsheet, or another biller as it is, mapped once and saved, or straight from Stripe.
POST /v1/customer-sources/eventsPrice 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. Change the rates of a model for new customers only, and existing customers keep the rates they signed up on until you move them.
model_versions + latency_slaDescribe a deal, or a model and how to bill it, in plain English. When you sign up, give it your pricing page or a pricing document, or answer a few questions, and it drafts your plans for you to review. For a deal, it proposes the plan, the new models the deal needs (priced only from what you wrote, with provider costs from a public price list), add-ons, and limits, every reference checked against your live catalog. Review the exact API calls and apply them in one click, or open a proposed model in the model form first. It runs on your own Anthropic key, and only once you turn it on. Or bring your catalog as a file: Import from file shows what it would change, plan by plan, and imports what you pick as drafts.
propose, review, applyTurn signed contracts into billing. Sign in with DocuSign and import completed envelopes, or upload a signed PDF. Meterbox reads the commit (multi-year ramps included), term, discount, true-up cadence, and custom rates, quoting the contract beside each one, into a proposal you review and turn into a draft quote. Contracts are read with your own Anthropic key, and the PDF is never stored.
POST /v1/contracts/docusign/syncThe 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 (your own features alongside the built-in ones, each shown on your plans and pricing page in the words of the plan or by its own name, and a plan can include every feature of another, listed as one line), 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. Show balances in your own unit, such as Credits or Bits, at a rate you set.
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. A plan can also end after a set number of days, once per person (by email, aliases included), like a cloud free tier: customers then choose another plan to keep going. 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. Limit one to particular plans or customers; set max redemptions and expiry dates; sync promotion codes with Stripe. A customer's coupon discounts the usage billed at period-end close too.
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 change to a model’s rates or a plan’s price and included usage, NDR and GDR retention cohorts, ARR with its quarter-over-quarter and year-over-year growth, revenue goals tracked against actual and projected revenue, CAC payback, burn multiple, and ARR per employee from the company financials you enter each quarter, value delivered reports that show a customer what they got for what they paid, as a PDF with your logo, 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-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 override the provider and the payment terms for tailored contracts (on net 15 to net 90, the invoice is emailed to pay within the days, and dunning starts when it goes overdue), 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/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 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/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. API keys can be full access, read-only, or read-write, optionally limited to parts of the API, or limited to reporting the usage of one customer, so each integration gets only what it needs.
PUT /cp/rbac/matrixAutomated billing close: we read usage from the in-cluster ledger, calculate overage, bill each plan's own price, its seats, and its add-ons (in arrears or in advance, by days or in full, your choice), add Stripe line items, check that the Stripe invoice totals what Meterbox computed before charging it (a mismatch is held for review), apply each customer's coupon before credits and tax, finalize invoices (one a coupon fully covers is recorded paid, never charged), mark ledger entries paid, and count coupon durations down. 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/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 and catalog identifies spend spikes (comparing 24-hour cost against the trailing median), churn spikes, aggregation drift (customers whose integration has silently broken), models priced under your margin floor after a provider raised its price, and models whose revenue has no provider cost behind it, which overstates their margin. Results are deduplicated, 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/*-marketplaceConnect 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/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, a button per plan, every feature in the words of the plan or by its name and description, Custom for a plan without a fixed price, included credits in your credit unit, and promotional prices with their code, 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. Link straight to canceling or to a plan change, and show the portal in Spanish, French, or German (or your own translations), with dates and prices formatted for each customer. 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-portalAccess 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
}
)