Skip to main content
Revenue tells you what a customer paid. It says nothing about what that customer cost you to serve. Cost Insights closes that gap: tag your events with the cost of delivering them, and Macropay folds those numbers into the same ledger that already tracks your orders and subscriptions. The result is real margin — per event, per customer, over a lifetime.
Cost Insights is currently in beta. Enable it from your organization settings to start ingesting cost-annotated events.

Why it matters

Macropay is your Merchant of Record, so the revenue side of the equation is handled for you — payments, sales tax, and VAT are already remitted and reconciled. Cost Insights adds the other half. Once both sides live in one place, you can answer questions that revenue dashboards never could:
  • Which customers are profitable, and which quietly lose money every month?
  • What’s the gross margin on a given product or plan after compute and provider fees?
  • Is a power user’s lifetime value actually positive once you net out their usage costs?
This is especially sharp for AI and agent products, where a single account can burn through model spend faster than it generates revenue. Pair Cost Insights with usage-based billing and you can watch billed revenue and underlying AI cost (COGS) move together — the foundation of agentic margin.

How it works

Three steps, no new pipeline:
1

Annotate events with cost

When you send events to the Event Ingestion API, add a _cost object to the event’s metadata. That’s the only change required on your side.
2

Macropay aggregates automatically

Costs roll up next to your existing revenue data — no manual joins, no separate cost warehouse to maintain.
3

Query profit, margin, and LTV

Read it back through the Metrics API or explore it visually in the Macropay Dashboard.

Annotating an event

The _cost amount is expressed in the currency’s minor units (cents for USD). Here, a single model inference cost a quarter of a cent to serve:
Already routing model calls through the Macropay AI proxy (POST /ai/v1/chat/completions)? Token cost is captured for you — Cost Insights picks it up without you computing _cost by hand.

What to track

Anything that costs money to deliver can become a cost event. Common patterns:

Next steps

Send your first cost event

Add the _cost property to your event metadata and start ingesting

Analyze cost & profit metrics

Query costs, profits, and customer lifetime value across your accounts