Revenue sources

Where a product's money numbers come from: MRR, its movements (new, expansion, contraction, churn, reactivation), customers, revenue, refunds, fees and with them Profit. A product can have several sources at once, for example Stripe for the web and RevenueCat for the app, or Paddle plus deals you bill yourself. Each source writes its own rows, and every page adds them up.

SourceFitsKeyWebhook
Stripeevery type (apps sell through web checkouts too)Restricted key, read onlySigning secret (whsec_…)
PaddleSaaS, Web + app, ServiceAPI key, read permissionsNotification destination's secret key
Lemon SqueezySaaS, Web + app, ServiceAPI keySigning secret you choose
PolarSaaS, Web + app, ServiceOrganization Access TokenWebhook secret (whsec_…)
Manual billingSaaS, Web + app, Servicenonenone
RevenueCatApp, Web + appSecret API key (v2) and project idAuthorization header value
AdaptyApp, Web + appSecret API keyAuthorization header value
App Store, Google PlayApp, Web + appThe store connection under Connect your toolsnone

Which sources a product is offered follows its Type (App, Web + app, SaaS, Service), which you can change on Settings › Products › your product at any time; sources already connected stay. Add sources in the Connect step of the first-run setup, the Revenue step of Add product, or later on Settings › Products › your product › Users, money and costs with Add a source. Opening the step saves nothing; only what you tick is kept. Keys go to the server once, are stored encrypted (MRROCKET_SECRET) and only ever come back masked.

Several sources on one product#

  • Adding up. MRR is the sum of every subscription of every source; revenue and Profit sum every payment and fee. The daily numbers are rebuilt from all sources together whenever one of them changes.
  • Nothing twice. RevenueCat and Adapty also track purchases made through Stripe or Paddle. When the product has Stripe (or Paddle) as a source of its own, they leave those purchases out, so a web subscription counts once.
  • Disconnecting one source removes its key and everything it imported; the other sources keep their numbers exactly.
  • Currency. The product has one currency; every source's amounts are converted on their day (ECB rates). It is fixed once revenue is imported.

Money rules#

The same for every source:

  • Revenue is what the customer paid without tax. A refund takes back its share, also without tax, on the day of the refund.
  • MRR comes from paid subscription payments spread over their period, and from the subscription's current price while it runs. A trial counts for nothing until the first payment. Yearly and weekly plans are normalized to a month.
  • Fees are a cost in Profit, on the day they were charged: Stripe's balance transactions, Paddle's fee, Polar's platform_fee_amount, the stores' commission. Lemon Squeezy reports no fee per payment, so none is booked for it.
  • Churn is a subscription that stops paying: canceled at the end of its paid period, expired or revoked.

Paddle#

Paddle Billing (not Paddle Classic). In Paddle open Developer tools › Authentication and create an API key with read permissions for Customers, Subscriptions, Transactions and Adjustments. Sandbox keys (pdl_sdbx_apikey_…) work the same and are marked test mode.

MRRocket reads customers, subscriptions, completed transactions of the last 24 months and approved refunds (adjustments). For the webhook add a notification destination in Developer tools › Notifications with the URL from the card (/api/webhooks/paddle/<product id>) and the events listed there, then paste the destination's secret key into the card.

Checked against the official docs on 2026-10-08 (developer.paddle.com): Authorization: Bearer <key> and Paddle-Version: 1; keys pdl_live_apikey_… / pdl_sdbx_apikey_… (sandbox at sandbox-api.paddle.com); lists paged with after (from meta.pagination.next) and per_page; amounts as strings in the lowest denomination; transaction totals in details.totals (subtotal, discount, tax, total, fee, earnings; fee and earnings once completed); refunds as adjustments with action: refund, status: approved; signatures Paddle-Signature: ts=…;h1=…, HMAC-SHA256 of ts:raw body, hex. MRRocket refuses timestamps older than five minutes (Paddle's own SDKs use five seconds). Not checked: subscription discounts (the subscription object does not carry the discount's amount; the invoices do, so revenue is right but MRR shows the list price until the next payment), multi-currency price overrides by country.

Lemon Squeezy#

In Lemon Squeezy open Settings › API and create an API key (a key made in test mode reads test data). MRRocket reads the first store the key sees: its customers, subscriptions, subscription invoices and one-time orders. The first order of a subscription is its first invoice already, so it is not counted twice. For the webhook open Settings › Webhooks, add the URL from the card (/api/webhooks/lemonsqueezy/<product id>) with a signing secret of your choice, tick the events listed on the card, and paste the same secret into the card.

Checked against the official docs on 2026-10-08 (docs.lemonsqueezy.com): JSON:API at api.lemonsqueezy.com/v1 with Accept: application/vnd.api+json and Authorization: Bearer <key>; pages with page[number] / page[size] (at most 100) and meta.page.lastPage; filter[store_id]; subscriptions name their price only by id (first_subscription_item.price_id, read from /v1/prices/:id: unit_price in cents, renewal_interval_unit and _quantity); invoices and orders carry subtotal, discount_total, tax, total, refunded_amount in cents; status: cancelled still runs until ends_at; signatures X-Signature, HMAC-SHA256 of the raw body, hex. Lemon Squeezy sends no delivery id, so a repeated delivery is recognized by its body. Not checked: usage-based prices (unit_price_decimal), stores in several currencies, several stores per key.

Polar#

In Polar open Settings › Developers and create an Organization Access Token with the scopes subscriptions:read and orders:read. A sandbox token is recognized and read from sandbox-api.polar.sh. For the webhook open Settings › Webhooks, add the URL from the card (/api/webhooks/polar/<product id>) with the format Raw, pick the events listed on the card and paste the endpoint's secret into the card.

Checked against the official docs on 2026-10-08 (polar.sh/docs): api.polar.sh (sandbox sandbox-api.polar.sh), bearer token; lists paged with page / limit (at most 100) and pagination.max_page; subscriptions carry amount, currency, recurring_interval and _count, status, started_at, ended_at, canceled_at, cancel_at_period_end and the customer; orders carry net_amount (after discounts, without tax), tax_amount, total_amount, refunded_amount, refunded_tax_amount, platform_fee_amount, billing_reason and subscription_id; webhooks follow Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature: v1,<base64>, HMAC-SHA256 of id.timestamp.body). Secrets made since 8 September 2026 are standard; older ones use the whole whsec_… text as the key, and MRRocket accepts both. Assumed, not stated in the docs: refunded_amount is without tax (tax has its own field).

Adapty#

For apps whose subscriptions run through Adapty. In Adapty open App settings › General and copy the secret API key (secret_live_…; keys are per app, so one per product). Paste it into the card: MRRocket checks it with one read of Adapty's Export Analytics API.

No history. Adapty has no API that lists past purchases or subscriptions (its server-side API reads one profile by its id, its analytics API gives totals per day). So MRRocket imports nothing: purchases, renewals, trials, cancellations, billing issues and refunds come in through Adapty's webhook, from the day it is on. Subscriptions that started earlier appear with their next renewal (or cancellation, or refund).

For the webhook:

  1. Choose a long random value and paste it into the card as Authorization header value (Save secret). Do this first.
  2. In Adapty open Integrations › Webhook, turn it on, enter the URL from the card (/api/webhooks/adapty/<product id>) as Production endpoint URL and the same value as Authorization header value for production endpoint.
  3. Enable the events listed on the card, leave Exclude historical events off, and Save. Adapty sends a verification request ({}), which MRRocket answers once the value from step 1 is saved.

Money follows the rules above: revenue is price_local without tax_amount_local, the store's cut (from net_revenue_local or proceeds_local) is a fee, a refund takes the revenue back on its day. The plan's period comes from the purchase and expiry dates. Events can arrive out of order: an ended subscription only opens again with a payment after its end, and a late cancellation does not undo an expiry. Sandbox events are answered and skipped. Each event (profile_event_id) counts once.

Checked against the official docs on 2026-10-09 (adapty.io/docs: Export Analytics API, webhook event types and fields, webhook setup). Not yet run against a real Adapty app; check the first events.

Manual billing#

For money that does not go through a payment provider: an agency retainer, a consulting contract, an invoice paid by bank transfer. Add deal takes the customer or deal, an optional email, the amount without VAT (what you invoice before VAT; VAT is not revenue, so MRRocket books the amount as it is), the currency, Monthly, Yearly or One-time, the start and an optional end (the last day it is billed). Import CSV takes a file with a header row, the amount again without VAT:

customer,email,amount,currency,interval,start,end
Acme retainer,ops@acme.com,1500,EUR,monthly,2026-07-01,
Beta yearly,,12000,EUR,yearly,2026-09-01,
Gamma (ended),,500,EUR,monthly,2026-03-01,2026-08-31
Workshop,,2500,EUR,one-time,2026-09-28,

Commas or semicolons, quotes around fields that contain them, 1.500,00 or 1500.00. Rows with a problem are skipped and named by their row; the others go in.

A monthly or yearly deal is a subscription with one payment at the start of every period up to today (or its end); its end is churn. A one-time deal is one payment on its date. The scheduled sync books the periods that come due. Removing a deal removes everything it wrote.

Local fakes#

Each provider has a local fake for development and the checks, in the style of the Stripe fake: node scripts/fake-paddle.mjs (port 4550, key pdl_sdbx_apikey_fake_ok), node scripts/fake-lemonsqueezy.mjs (4560, key ls_fake_ok_0123456789abcdef), node scripts/fake-polar.mjs (4570, token polar_oat_fake_ok), node scripts/fake-adapty.mjs (4580, key secret_live_fake_ok; … send <url> <value> <type> posts one event). In development a key containing fake talks to its fake when PADDLE_API_BASE, LEMONSQUEEZY_API_BASE, POLAR_API_BASE or ADAPTY_API_BASE is not set; in production never. Each fake can also send signed webhooks (… send <url> <secret> <type>). npx tsx scripts/db/check.ts analytics payments --smoke imports each fake in steps and compares MRR, revenue, refunds and fees with what the fake holds, applies signed webhooks once, refuses tampered ones, and checks manual deals, a CSV, Adapty's events (also out of order) and Stripe plus RevenueCat on one product.

Status: built from the official API docs and tested against the local fakes; not yet run against a real Paddle, Lemon Squeezy, Polar or Adapty account.