Revenue and cost, closing on one basis

What each user earns you — and what they cost.

DuckLedger joins revenue, cost and behavior in one ledger. MRR, cohorts and churn from 7 gateways and the app stores; cloud, AI, WhatsApp and hosting with an owner; screens, friction and campaigns per person. And the answer that only exists once it all closes: margin by product, by customer, by user and by campaign.

Multi-product · RBAC · Encrypted secrets · No spreadsheet archaeology

Sample · current month

MRR

R$ 248.4k

Gross margin

63.3%

Cost / user

R$ 3.12

LTV:CAC

4.1×

Full revenue metrics

MRR, ARR, waterfall, NRR, GRR, cohorts and conversion funnel.

Every cost has an owner

Cloud, AI and expenses allocated to the product that caused them.

Margin per user

Revenue minus direct cost, down to the person and the session.

Behavior with revenue

Screens, friction, retention and campaigns tied to what each person pays.

See it in 2 minutes

How DuckLedger works, in motion

Three short videos: the path from money to margin per person, what in-product behavior says about retention and campaigns, and how a cloud bill becomes cost per request.

Asaas, Stripe, Pagar.me, Mercado Pago and the app stores land in one ledger — Pix, cards and in-app, with fees and refunds kept apart from gross.

0:00 / 0:41
Read the script
  1. Revenue. Asaas, Stripe, Pagar.me, Mercado Pago and the app stores land in one ledger — Pix, cards and in-app, with fees and refunds kept apart from gross.
  2. Cost. AWS, AI providers, WhatsApp, Vercel, Supabase and Hostinger import their bills on their own, with a product and a classification.
  3. Usage. The SDK sends what the product does. Every model call, message and request gets an owner: a person, by name.
  4. The joint. Revenue minus cost, per person. This is where you see who pays for what they use — and who costs more than they bring.
  5. The result. Gross margin, cost per user, LTV:CAC and payback, computed on profit rather than on accumulated revenue.
  6. Duck CFO. Ask in plain language. Duck CFO answers with your numbers, in tables and charts, and shows where each figure came from.
What it answers

The questions neither half of the equation can answer alone

A revenue tool knows what came in. A FinOps tool knows what went out. Some already join cloud cost with usage billing — but not Asaas, Pix, stores and AI on one Brazilian founder P&L. These are DuckLedger’s questions.

Revenue

Why did MRR move this month?
A typed waterfall: new, expansion, reactivation, contraction and churn — each movement written once and never revised.
Is the base retaining, or just growing over the leak?
NRR, GRR and quick ratio anchored to the snapshot the month opened on.
How many trials actually convert?
Trial and free→paid funnel with the outcome recorded when it happens, measured over resolved rather than started.
How much comes from cards, Pix and the app stores?
Asaas, App Store, Google Play and RevenueCat in one ledger, with fees and refunds separated from gross.

Cost

Which product spent the R$ 8k of AWS?
Cost Explorer imported and allocated by workspace, not one undifferentiated “infra” line.
What did the AI model cost, per feature?
Cost by provider, project and key, attributed to the product that made the call.
Does this cost serve a customer, buy one, or neither?
Explicit classification — cost of revenue, acquisition or overhead. Until it is classified, margin is not invented.
What is the real fixed cost per product?
Manual, recurring and CSV-imported expenses, with supplier and category.

Per user

What does serving this user cost?
Usage events and traces carrying measured or estimated cost, summed per person and per session.
Does this customer pay for what they consume?
Net revenue attributed to the customer, minus their direct cost — the contribution result.
What did that AI conversation cost?
A trace per conversation, checkout or job, with every step, provider and currency visible.
Does LTV cover CAC — in profit, not in revenue?
LTV computed on gross profit, payback by cohort, and churn weighted by margin.

Product and campaigns

Which screens do people use most — and come back to?
A screen ranking with people, sessions, time, conversion and D7/D30 return.
Where do people get stuck?
A friction score per screen with its reason: errors, failures, rage or dead clicks and abandoned forms.
Which campaign brings customers who are profitable?
Visitors, sign-ups, paying, CAC, ROAS and result on margin, by first or last touch.
What did the people who stay and pay use early on?
Early adoption against D30 retention and contribution per person — the onboarding list that works.
The joint

Checkout to profit is six stages. Almost nobody crosses the fourth.

Revenue tools stop at stage 3. Cloud FinOps starts at 4; large stacks already import usage-billing revenue, but they do not cover Asaas, Pix, or a Brazilian founder. “Is this customer profitable?” lives at the joint — same product, same period, same currency.

  1. 1

    Charge

  2. 2

    Subscription

  3. 3

    Analytics

  4. 4

    Cost

  5. 5

    Allocation

  6. 6

    Profit

  • Revenue tools2–3

    MRR, churn, cohorts

  • Cloud FinOps tools4–5

    cloud cost by tag

  • DuckLedger2–6

    crosses the joint

The gateway moves the money at stage 1. DuckLedger explains the five that follow.

Revenue side

Subscription metrics that reconcile with the statement

Not a pretty MRR chart on top of a CSV. A ledger of movements, daily snapshots and outcomes written when they happen — because a canceled subscription no longer remembers what it was worth.

Normalized MRR and ARR

Weekly, monthly, quarterly, semiannual and annual compared after normalization. Moving 99 a month to 1,800 a year is 51 of expansion, not 1,701.

Movement waterfall

New, expansion, reactivation, contraction and churn — with voluntary churn separated from involuntary by the status the subscription lapsed from.

Cohorts and retention

Cohort retention, ARPU, average lifetime, and NRR/GRR anchored to the snapshot the month opened on.

Trial and free→paid funnel

Outcomes written once and never recomputed. Rate over resolved, with the still-open population always shown beside it.

Stores and in-app purchase

RevenueCat covers Apple, Google and web at once; App Store and Play also connect directly. Store commission and refunds kept apart from gross.

Brazilian payments, natively

Asaas, Stripe, Pagar.me, Paddle, Iugu, Mercado Pago and AbacatePay: Pix, boleto, cards and subscriptions, with idempotent webhooks and several gateways synced side by side.

Segmentation and forecast

Customer attributes, saved segments, and a revenue forecast built from observed movements.

Revenue attribution

Every payment resolved to the product that earned it — never “somewhere in the gateway.”

Cost side

Every cost with an owner and a classification

A cost with no product never becomes margin. DuckLedger imports spend where it originates, attributes it to a workspace, and forces a question accounting never asks: does this serve a customer, buy one, or neither?

Vercel, Supabase and Hostinger

Vercel exact by service and project; Supabase and Hostinger estimated from the plan and labelled as such. Alerts when a renewal gets dearer.

WhatsApp per person

Each message priced from Meta’s rate of the day, by category and country — and tied to the person who received it.

AWS Cost Explorer

Automatic sync of spend by service, written as an expense on its competence date and allocated by product.

AI APIs by provider

OpenAI, Anthropic, OpenRouter, Gemini and more, with a daily sync and attribution by project, key and workspace.

Real expenses

Manual, recurring and CSV-imported, with supplier, category and competence date.

Cost classification

Cost of revenue, acquisition or overhead. Every category starts as overhead, so an unclassified one never silently inflates margin or CAC.

Allocation by product

Shared cost stays at the organization; each workspace’s P&L stays clean and comparable.

Unit cost

An auditable formula engine: total cost over active users, operations or requests — whichever metric you define.

Savings radar

Six deterministic rules point at what to cut: an idle subscription, an expensive model for the task, an unused service. Each with the amount at stake.

Bills reconciled with usage

The cost the SDK measured is compared with the provider’s bill. The difference shows; the two are never added.

Where it closes

LTV in gross profit, not in accumulated revenue

A revenue LTV tells you what a customer will pay. Only LTV on margin tells you what you keep — the one version comparable to what acquiring them cost. Four figures no revenue-only tool can produce.

gross margin  = (revenue − cost of revenue) / revenue
CAC           = acquisition spend / new customers
LTV (margin)  = ARPU × average lifetime × gross margin
LTV:CAC       = LTV (margin) / CAC
payback       = CAC / (ARPU × gross margin)

A month that acquired nobody does not have a CAC of zero — it has no CAC. A negative margin has no payback period. The figure comes back null instead of lying.

Illustration of operational metrics flowing into a unit-cost prism

Profit cohorts

Everyone charts revenue retention by cohort. Here the cohort accumulates gross profit until it covers what acquiring it cost — and the month that happens has a name.

Margin-weighted churn

Losing a high-margin customer and a negative-margin one are not the same event. One of them improves the company.

Cash and competence never sum

The margin rate comes from the P&L; recurring revenue lives on its own basis. Carrying the rate into MRR is standard practice — adding cash revenue to MRR is the error this separation exists to prevent.

Per user and per session

The cost of serving one person, event by event

Average cost per active user is a division, not a measurement. Instrument what the product actually does, and every model call, job and conversation gets an owner, a session, a currency and an amount.

Node SDK

One ingest key and one package. Batching, retries and idempotency on the event ID.

Supabase / PostgreSQL

Usage already lives in your tables: one read-only view and a scheduled query.

PostHog

Already-standardized events import directly with host, project and a personal key.

await usage.withTrace(
  {
    kind: 'conversation',
    name: 'Support chat',
    subject: user.id,
  },
  async (trace) => {
    trace.step('retrieveContext');

    usage.track({
      type: 'ai.tokens_spent',
      data: {
        model: 'gpt-4o',
        prompt_tokens: 1200,
        completion_tokens: 400,
      },
    });
  },
);

Tokens with no cost attached are priced from public list rates and marked estimated. Pass a measured cost and it replaces the estimate.

Illustration of product nodes converging into a central financial ledger
  • Traces that correlate the whole unit of work

    Conversation, checkout or job: every step, provider and service hop on one row, with duration and cost.

  • Measured and estimated never blur

    What the provider charged and what the price catalog computed carry different labels on the same screen.

  • Currencies sit side by side

    A trace that burned USD on a model and BRL on a gateway fee cost two things. Picking an exchange rate to merge them is your decision, not the cell’s.

  • Usage subject linked to the paying account

    Your app’s internal ID becomes the identity; the e-mail links the person to the customer on its own, and one account can pay for many users without multiplying the revenue.

  • Who is using it right now

    A live panel of active people, from where and on what — with real-time cost and revenue and a forecast for the month.

Product behavior

Where people use the product, where they get stuck — and what it is worth

Analytics tools show clicks. DuckLedger ties every screen, funnel and campaign to the revenue and cost of the people who went through it. The question stops being “how many used it” and becomes “do the people who use this stay and make money?”.

Most used screens

People, views, sessions, median time, conversion and D7/D30 return per screen — with ids collapsed into /orders/:id.

Friction with a reason

Errors, failed actions, rage clicks, dead clicks, abandoned forms and slow completions, in one score that always explains itself.

Session funnels

Screens, actions and features in sequence. The step with the biggest drop is highlighted.

Retention and cohorts

D1, D7 and D30 over people who have had time to return, weekly cohorts and DAU/MAU stickiness.

Return per person

Sessions, active days and main screen next to each person’s revenue, cost and contribution.

Campaigns on margin

First- and last-touch UTMs through to payment: visitors, sign-ups, activated, paying, CAC, ROAS and result.

Onboarding insights

People who used each screen or feature early versus those who did not: retention, paying share and contribution.

Heatmaps in PostHog

Connect PostHog and every screen links to its heatmap and recordings, without a second tool to babysit.

The key never reaches the browser

The tracker posts to a route of your app, which attaches the signed-in user. A page cannot pretend to be someone else.

Private by default

Paths without query strings, ids collapsed to :id, elements named without their text and no form contents read.

The campaign survives sign-up

The source stays on the device: someone who came from an ad and signed up days later is still credited to that ad.

Duck CFO

Ask. The answer comes with your numbers.

An assistant that reads your ledger — revenue, cost, usage and behavior — and answers as a report, with tables and charts. It also sets things up: it creates and validates keys and explains which SDK to use.

  • Answers with sources. Every figure comes from a query on your ledger, and the answer says where it came from.
  • A report, not a paragraph. Tables and charts inside the answer, ready to take to the meeting.
  • Helps you integrate. Creates and validates API keys and points to the right SDK for your stack, inside the chat.

Why did NutriOS margin drop in September?

✦ Duck CFO

AI cost per user rose 38% after support chat moved to a larger model, while revenue held flat. Moving short conversations back to the previous model would recover about $2.1k a month.

How the numbers behave

A number that cannot be justified is not shown

This is not modesty — it is what separates a decision dashboard from a decorative one. When the basis is missing, DuckLedger says it is missing.

Null instead of zero

Spending R$ 3,000 and acquiring nobody is not free acquisition. With no basis the answer is null, and the screen says what still needs connecting.

Estimated is labeled estimated

A cost derived from list prices never dresses up as a measured one. The same holds for trace names inferred from the route.

Environments never mix

Sandbox and production are filed under the environment the event carries, not the one the connection was set to.

Nothing is counted twice

Idempotent webhooks, store aliases resolved to a single customer, and instrumented cost reconciled against the invoice rather than added to it.

Where it fits

Half the equation already has tooling. The whole one does not.

Compared by category, not by brand. Large FinOps already joins cloud cost with usage-billing revenue; DuckLedger joins Asaas, stores, cloud, AI and expenses on one P&L, in reais.

  • MRR, churn, cohorts

    Revenue tools
    Does it well
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does it partially
    DuckLedger
    Does it well
  • Apple and Google subscriptions

    Revenue tools
    Does it partially
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does it partially
    DuckLedger
    Does it well
  • Pix, boleto and BR billing

    Revenue tools
    Does not
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does it well
    DuckLedger
    Does it well
  • Cloud cost by product

    Revenue tools
    Does not
    Cloud FinOps
    Does it well
    Spreadsheet + accountant
    Does it partially
    DuckLedger
    Does it well
  • AI API cost

    Revenue tools
    Does not
    Cloud FinOps
    Does it partially
    Spreadsheet + accountant
    Does it partially
    DuckLedger
    Does it well
  • Margin and profit by product

    Revenue tools
    Does not
    Cloud FinOps
    Does it partially
    Spreadsheet + accountant
    Does it partially
    DuckLedger
    Does it well
  • LTV on gross profit

    Revenue tools
    Does not
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does not
    DuckLedger
    Does it well
  • Cost and revenue per user

    Revenue tools
    Does not
    Cloud FinOps
    Does it partially
    Spreadsheet + accountant
    Does not
    DuckLedger
    Does it well
  • WhatsApp and hosting cost per person

    Revenue tools
    Does not
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does not
    DuckLedger
    Does it well
  • Screens and friction tied to revenue

    Revenue tools
    Does not
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does not
    DuckLedger
    Does it well
  • CAC and ROAS per campaign, on margin

    Revenue tools
    Does it partially
    Cloud FinOps
    Does not
    Spreadsheet + accountant
    Does it partially
    DuckLedger
    Does it well
  • Answer the same day

    Revenue tools
    Does it well
    Cloud FinOps
    Does it well
    Spreadsheet + accountant
    Does not
    DuckLedger
    Does it well
How it works

From connection to margin in four steps

No six-week implementation. Wire the structure once, and the numbers compound on their own.

  1. 01

    Map the products

    One organization, one workspace per product. Shared cost stays at the org; each product’s P&L is comparable from day one.

  2. 02

    Connect revenue

    Asaas for Pix, boleto and cards; RevenueCat or the stores for in-app purchase. Backfill once, webhooks for the rest.

  3. 03

    Connect cost

    AWS, AI providers, WhatsApp, Vercel, Supabase, Hostinger and expenses. Classify each category as cost of revenue, acquisition or overhead.

  4. 04

    Instrument usage

    Server SDK plus the browser tracker. From there, “what does this user cost, earn, where do they get stuck and where did they come from” has an answer with a name and a session.

Pricing

Start free. Pay when it already pays for itself.

One subscription per company, priced on how many customers you track. No per-seat charge, no cut of your revenue.

Free

Para validar antes de pagar.

Free

  • Até 10 clientes cadastrados
  • 1 gateway conectado
  • Custos, despesas e lucro por produto
  • Dashboard e cockpit do founder
Start free
Pricing

Starter

Para quem já tem receita entrando.

R$99.90/month

  • Até 1.000 clientes cadastrados
  • Todos os gateways e lojas
  • MRR, churn, coorte e projeção
  • API, webhooks e chaves de uso
  • Custos de IA e AWS importados
Start a 14-day free trial

Scale

Para operações com vários produtos.

R$299.90/month

  • Até 10.000 clientes cadastrados
  • Tudo do Starter
  • Workspaces ilimitados
  • Relatórios agendados e alertas
  • Suporte prioritário
Start a 14-day free trial

On paid plans the card goes in now and the first charge lands after 14 days. Cancel before that and nothing is charged.

Hit the limit? Nothing is deleted — only new customer records pause until you change plan.

Managed service

Or leave the work to me.

Connecting sources, classifying cost, splitting it per product and reading the number every month is work — and it is where most people stop. On the managed tiers that part is mine, not yours: you get the close and the decision it points to.

Fechamento

Um produto, a margem fechada todo mês.

R$2,500/month

For companies at R$ 20 mil a R$ 100 mil de MRR

6 month minimum term

  • Implementação inclusa: gateways, lojas, AWS e provedores de IA conectados por nós
  • Custos classificados e rateados por produto — sem planilha da sua parte
  • Fechamento de margem entregue todo mês, com 45 minutos de leitura junto
  • Réguas de recuperação de cobrança falha e win-back ativas
  • Suporte direto por WhatsApp
Talk to me

Fechamento+

Vários produtos, cada um com o seu P&L.

R$4,900/month

For companies at R$ 100 mil a R$ 400 mil de MRR

6 month minimum term

  • Tudo do Fechamento, em quantos produtos e workspaces você tiver
  • P&L por produto, por coorte e por canal de aquisição
  • Revisão trimestral de preço e de plano, com o número na mesa
  • Relatório pronto para sócios e para o contador
  • Aviso proativo quando um produto entra no vermelho
Talk to me

Implementation is inside the monthly fee, never billed separately. Above R$ 400k MRR, or for anything outside the scope above, the engagement is quoted.

Illustration of a shield and lock representing secure financial data
Security

Financial data treated as the production system it is

An ingest key lives on your server and its scope is deliberately narrow: send events, read the meter catalog, register a missing type. Nothing else.

  • HttpOnly cookies and rotating refresh tokens
  • Gateway and provider secrets encrypted at rest
  • Organizations, workspaces and permission-scoped RBAC from day one
  • Audit trail, including for machine actors
  • Read-only external database connections with TLS certificate verification
  • Signed webhooks with an auditable delivery log
  • Cloud tokens used on read-only endpoints only, stored encrypted
  • A browser tracker that reads no forms, keeps no query strings and never holds the ingest key

Stop answering “are we profitable?” with an export.

If you run digital products and the revenue answer lives in one tool, the cost in another, and the margin in none — that joint is what DuckLedger closes.

Already on the team? Sign in and pick up where you left off.