Cost Insights is a powerful feature that enables you to calculate business-centric metrics like Costs, Profits, and Customer Lifetime Value (LTV) by annotating your events with cost data.

Overview

While OurPay automatically tracks revenue from orders and subscriptions, Cost Insights allows you to track the costs associated with delivering your product or service. By combining revenue and cost data, you can gain deep insights into profitability on a per-customer basis.

How It Works

Cost Insights works in three simple steps:
  1. Ingest events with cost data: Add a _cost property to events metadata when ingesting them through OurPay’s Event Ingestion API
  2. Automatic aggregation: OurPay automatically aggregates costs alongside your revenue data
  3. Query and analyze: Use the Metrics API, or the OurPay Dashboard to retrieve costs, profits, and customer LTV

Quick Example

Common Use Cases

  • AI/LLM Applications: Track the cost of API calls to OpenAI, Anthropic, or other LLM providers
  • Infrastructure Costs: Monitor compute, storage, or bandwidth costs per customer
  • Third-Party Services: Track costs from email providers, SMS gateways, or other external services
  • Customer Profitability: Calculate profit margins and LTV for each customer

Documentation

Cost Events

Learn how to track costs by adding the _cost property to your events metadata

Cost Metrics

Query and analyze costs, profits, and customer lifetime value