API reference / Analytics
Get the revenue sync
The state of the revenue sync from the workspace's payment providers (Stripe, Lemon Squeezy, Polar and Paddle) and the Payment API. It gives when the sync last read a provider, and how many payments it tied to a visitor. It also gives how many payments of the last 30 days it could not tie: they had no troopy_visitor_id, checkout id or email to match. Then it gives the reads that the Stripe key lacks, and the last error of each provider.
/api/v1/analytics/revenueOther ways to call it
troopy analytics revenuetroopy_get_analytics_revenueResponse
200 · application/jsondata*object7 properties
syncedAt*string | nullattributed*integerPayments that Troopy tied to a visitor, all time
unattributed*integerPayments of the last 30 days that Troopy could not tie to a visit
unattributedRevenue*integerThe sum of those payments, in minor units
missing*string | nullThe reads that the keys do not have, with the provider of each, like "Refunds in Polar". Give each key those reads, or replace it
error*string | nullsubscriptions*object | nullThe sum of the subscriptions of every connected provider. Troopy reads them once an hour at most. null before the first read
8 properties
mrr*integerMonthly recurring revenue, in minor units: active and past-due subscriptions, after their coupons
mrrBefore*integer | nullMRR about 30 days ago, if Troopy has that history
currency*string | nullsubscribers*integertrials*integer | nullSubscriptions in their free trial. null on a reading from before Troopy counted trials
churnRate*numberThe share of the subscriptions that paid 30 days ago and ended since, 0 to 1. A trial counts from its first payment
ltv*integer | nullRevenue per subscriber divided by the monthly churn, in minor units
at*stringISO 8601 date and time