Know which users cost you more in AI than they pay.
FiscaLLM puts every user's AI spend next to their subscription revenue, so you see your real margin per user, plan and free trial before the provider bill arrives.
10-minute setup · No prompts leave your backend

Works with your stack
The problem
AI apps run on thin, invisible margins
Subscription pricing assumed software costs nothing per user. With AI, every message has a price.
Flat price, variable cost
Every subscriber pays the same, but a heavy user can burn through ten times the tokens of a light one.
Two systems that never meet
Your provider bill knows tokens. RevenueCat knows revenue. Neither knows which user is which.
Trials that quietly lose money
Free trials run on real AI. Without numbers you cannot tell what a trial costs or what a conversion is worth.
How it works
Set up in ten minutes
No proxy, no changes to how you call AI providers, nothing in your app's request path.
- 01
Track AI calls on your backend
Add one line after each AI request. The SDK reports token counts in the background and never slows or breaks your response.
meter.trackOpenAI(res, { userId }) - 02
Connect RevenueCat
Paste one webhook URL. Purchases, renewals, trials and refunds arrive as they happen, net of store fees and tax.
https://fiscallm.com/api/webhooks/rc/… - 03
See your real margin per user
AI cost next to revenue for every user, plan and trial cohort, with the people losing you money at the top.
demo-heavy −$16.41
What you get
Your real margin per userplantrialmodel
Margin per user
Revenue minus AI cost for every subscriber, worst first. Filter to paying users who cost more than they pay.
Cost per trial
AI spent during free trials, per trial and per converted trial, by start week.
Plans that lose money
Each product's revenue, AI cost and margin, so you can price plans on real numbers.
Cost by model and feature
See whether chat, summaries or images drive the bill, and which model to switch.
Monday email
Last week's margin and the users and plans that lost money, in your inbox.
Accurate prices, your prices
List prices kept current, including cached tokens and long-prompt rates. Add negotiated discounts per provider or model.
Built for mobile subscriptions
Trials, renewals, refunds, upgrades and anonymous-to-logged-in users from RevenueCat, all handled.
For developers
One line per AI call
A zero-dependency TypeScript SDK with helpers for OpenAI, Anthropic and Gemini, streaming support, and a plain HTTP API for everything else.
- ✓Never throws, never blocks your response
- ✓Batches in the background with waitUntil
- ✓Retries are de-duplicated, so nothing counts twice
import { createMeter } from "fiscallm";
const meter = createMeter({
apiKey: env.FISCALLM_KEY,
waitUntil: ctx.waitUntil.bind(ctx),
});
const res = await openai.chat.completions
.create({ model, messages });
// that's it
meter.trackOpenAI(res, { userId, feature: "chat" });Privacy by design
Your users' conversations never reach us
The SDK sends counts, not content. No prompts, no responses, no names or emails: just an ID, a model and the number of tokens.
- Counts, not contentToken numbers and model names only.
- 90-day raw retentionRaw events are deleted after 90 days; daily totals stay.
- Delete anytimeRemove an app's data in one click from Settings.
- Hashed keysIngest keys are stored as hashes, never in plain text.
FAQ
Questions, answered
What exactly does FiscaLLM store?+
User IDs, token counts, model names and RevenueCat subscription events. Never prompts or responses: those stay on your backend.
Which apps is it for?+
Subscription apps that call AI models from their own backend, such as a Cloudflare Worker, a Supabase or Firebase function, or a Node server, and that use RevenueCat.
How is the cost calculated?+
From each provider's list price on the day of the call, including cached tokens, cache writes and long-prompt pricing. If you have a negotiated rate, add it in Settings.
What if FiscaLLM is down?+
Your app is unaffected. The SDK sends in the background with a two-second timeout and one retry, then drops the event.
What does it cost?+
Nothing during the beta. We will tell you well before any paid plan applies to you.
Stop guessing your AI margins.
Connect your backend and RevenueCat in ten minutes. Free during the beta.