Blog / Revenue

Add revenue metrics to your app UI

To add revenue metrics to your app, pull them from an external revenue API on your server and render them in your own UI. With Crossdeck you read MRR, paying customers, and revenue by rail from /v1/revenue, format them client-side, and show a revenue strip in your product — without building or reconciling a billing pipeline yourself.

  • Add revenue metrics by pulling reconciled aggregates from an API, not your billing tables.
  • Render MRR, paying customers, and rail split in your own UI.
  • Keep the secret key server-side; the browser calls your backend.

Definitions used in this guide

Revenue truth

A verified view of subscription state, renewals, refunds, and active access across all payment rails.

Cross-platform access

A policy that lets one customer unlock the same entitlement across iOS, Android, and web.

Reconciliation

The process of checking incoming events against the source system so missed webhooks do not leave access or revenue wrong.

What should be true before you start?

Before you add revenue numbers, decide where they belong and how fresh they must be. A revenue strip in an admin header or a founder view needs reconciled aggregates, not a live query against billing tables. This is the focused, revenue-only slice of the app revenue API, and it pairs with seeing app revenue in real time.

Teams that do this well make the data model boring before they make the UI impressive. They decide what the product trusts, how the customer is identified, and which events prove that a premium flow worked. That upfront discipline prevents pricing changes, support escalations, or platform additions from turning into a rewrite later.

  • Pick the surface: an admin header, a founder dashboard, a status page.
  • Decide the metrics: MRR, paying customers, revenue by rail, a trend.
  • Keep the secret key on the server; format money in the UI.

How should you implement this step by step?

Pull the revenue aggregates server-side, cache them, and render a small strip of cards. Money comes back in minor units, so format it client-side. When you want to connect a number to the customers behind it, pivot to the cross-match.

Implementation should move from trust to explanation. First make the purchase and access state reliable. Then add the events and context that explain whether the path is working for real customers. That order matters because a beautiful funnel built on unreliable access logic will still mislead the team.

  • Call /v1/revenue?days=30 from your backend with your secret key.
  • Read mrrCents, payingCustomers, and byRail.
  • Render a revenue strip in your product, formatted in your currency.
  • Link a metric to its customers via the cross-match when you need depth.
A minimal revenue strip
CardFieldNote
MRRcurrent.mrrCentsMinor units; format in UI.
Paying customerscurrent.payingCustomersA count, not a list.
By railcurrent.byRailApple, Google, Stripe.
A revenue strip from one call js
const r = await fetch('https://api.cross-deck.com/v1/revenue?days=30', {
  headers: { Authorization: 'Bearer ' + process.env.CROSSDECK_SECRET_KEY }
});
const { data } = await r.json();
renderStrip({ mrr: data.current.mrrCents / 100, customers: data.current.payingCustomers });

Where do teams make mistakes?

The usual mistake is computing revenue from raw billing tables instead of a reconciled API.

Most production problems here are not caused by missing one API call; they are caused by model mistakes. Teams mix catalog structure with access logic, treat frontend success states as final truth, or log events without preserving identity. Those shortcuts often feel fine during integration and expensive during the first real support incident.

  • Querying billing tables live and showing unreconciled numbers.
  • Formatting cents as dollars by treating the integer as a float.
  • Calling the revenue API from the browser instead of your backend.

How does Crossdeck operationalize the workflow?

Crossdeck returns reconciled revenue aggregates over a secret-key gate, so adding revenue to your product is a cached server call plus a little UI. The number is trustworthy because it comes from the ledger, and it connects to the customers behind it through the cross-match.

The result is a revenue strip your team trusts, shipped in an afternoon, backed by the reconciled ledger — and one pivot away from the customers behind the number.

The operating win is not just cleaner instrumentation. It is that product, support, and engineering can all look at the same customer and reason from the same truth. That shortens the loop between insight, bug fixing, and revenue recovery.

What should a healthy rollout let your team do?

After rollout, the team should be able to inspect one customer and answer four basic questions quickly: what they bought, what access they should have, what they did before the key moment, and whether an error or product break interrupted the path. If those answers still live in different systems, the rollout is not finished yet.

A healthy setup should also make pricing, platform, and lifecycle changes cheaper. New SKUs, trial structures, payment rails, or premium features should mostly be mapping and instrumentation updates, not excuses to rewrite the access model from scratch.

  • Trace one premium journey from paywall view to verified access.
  • Confirm support can explain a paid-user issue without engineering stitching exports together.
  • Review whether new products can be attached without changing feature checks.

What should you review after launch?

The first review cycle should happen with real production questions, not a checklist alone. Look at a new conversion, a failed payment or retry, a support ticket, and a customer who used a premium feature successfully. If the workflow is sound, those stories should be easy to reconstruct.

From there, keep reviewing the signal as an operating surface. The point is not only to collect data. It is to make the next pricing change, onboarding improvement, or incident response faster because the evidence is already joined.

  • Review the earliest events that predict retained value.
  • Check the gap between entitlement state and what the UI showed.
  • Use the next support conversation as a live test of the model.

How should the whole team use the workflow?

A workflow like this becomes more valuable when it is not trapped inside engineering. Support should be able to confirm access and recent failure context. Product should be able to connect the path to adoption or conversion quality. Engineering should be able to see which state or step broke first.

When those three views line up, the system starts compounding. Each incident teaches the team something about pricing, onboarding, premium UX, or instrumentation instead of dying as a one-off ticket.

  • Support: confirm entitlement state and the last premium action quickly.
  • Product: review which steps correlate with value or friction.
  • Engineering: prioritize breaks by customer and revenue impact.

Frequently asked questions

How do I add revenue metrics to my app?

Pull reconciled aggregates from a revenue API on your server, then render MRR, paying customers, and revenue by rail in your own UI. Keep the secret key on the backend and format money client-side.

Should I compute revenue from my billing tables?

Prefer a reconciled revenue API. Raw billing tables miss refunds, retries, and rail timing, so a number computed live can mislead. A ledger-backed aggregate is safer to display.

Can I connect a revenue number to customers?

Yes. Pivot from the aggregate to the cross-match for any customer to see their revenue, entitlements, and read-cost together.

Does Crossdeck work across iOS, Android, and web?

Yes. Crossdeck is designed around one customer timeline across Apple, Google Play, Stripe, and web or mobile product events, so the same entitlement and revenue model can travel across surfaces.

What should I do after reading this guide?

Use the CTA in this article to start free or go straight into browse the reporting api reference so you can turn the concept into a verified implementation.

Crossdeck Editorial Team

Crossdeck publishes practical guides about subscription infrastructure, entitlements, revenue analytics, and error reporting for paid apps. Every guide is reviewed against Crossdeck docs, SDK behaviour, and implementation details before publication.

Take this into the product

Open the Reporting API reference, pull /v1/revenue, and add a revenue strip to your product.