Cost rates and gross margin per customer
Revenue now shows what serving each customer costs you against what they pay, from cost rates you set per quota, with an alert when a paying customer's margin drops.
Added
4- RevenueCost and margin, below By month on Revenue, shows revenue, cost, gross margin and margin % for one month and one currency, the customers losing money, and margin by customer, plan and quota. Cost is the quota usage your app recorded, priced at your cost rates, plus costs you enter by hand for a customer, a quota or overhead. Revenue is each customer's MRR, without metered overage or one-time payments.
- RevenueCost rates sets what a unit of a quota costs you, per currency and from a date, for example 0.002 per 1,000 tokens. A new price is a new rate, so past months keep the rate that applied then, and usage before a quota's first rate counts at 0. The figures are rolled up every six hours, and Recompute rolls the chosen month up again.
- WebhooksSet a Margin alert percent and your webhook endpoints receive subscription.margin_below_threshold when a paying customer's margin this month falls below it, once per customer and month.
- RevenueCost data is read and written under /api/subscriptions/costs (margin, recompute, rates, entries and settings), from a console session or an admin key only. No SDK or public route returns it.