Analytics
Get Unit Economics
Average revenue per account and per subscription, plus LTV derived from revenue churn.
GET
/
v1
/
analytics
/
unit-economics
Unit economics (ARPA / ARPU / LTV)
curl --request GET \
--url https://billing.example.com/v1/analytics/unit-economics \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/analytics/unit-economics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/analytics/unit-economics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/analytics/unit-economics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/analytics/unit-economics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/analytics/unit-economics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/analytics/unit-economics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}Returns average revenue per account (ARPA — MRR divided by active customers), average revenue per subscription (ARPU — MRR divided by active subscriptions), and lifetime value (LTV — ARPA divided by the monthly revenue churn rate). All money values are FX-normalized to the reporting currency, in minor units.
LTV requires MRR history and a non-zero churn rate:
has_ltv is false (and ltv is 0) until both exist.
Example Request
curl "https://api.recurso.dev/v1/analytics/unit-economics" \
-H "Authorization: Bearer $API_KEY"
Response
{
"data": {
"reporting_currency": "USD",
"mrr": 4850000,
"active_customers": 320,
"active_subscriptions": 334,
"arpa": 15156,
"arpu": 14520,
"monthly_churn_rate": 1.8,
"ltv": 842000,
"has_ltv": true
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
reporting_currency | string | Currency every money value is normalized into |
mrr | integer | Normalized MRR, minor units |
active_customers | integer | Customers with at least one active subscription |
active_subscriptions | integer | Active subscriptions |
arpa | integer | MRR / active customers, minor units |
arpu | integer | MRR / active subscriptions, minor units |
monthly_churn_rate | number | Revenue churn over the trailing period, in percent |
ltv | integer | ARPA / monthly churn rate, minor units; 0 while has_ltv is false |
has_ltv | boolean | true once MRR history exists and churn is non-zero |
⌘I
Unit economics (ARPA / ARPU / LTV)
curl --request GET \
--url https://billing.example.com/v1/analytics/unit-economics \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/analytics/unit-economics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/analytics/unit-economics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.example.com/v1/analytics/unit-economics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://billing.example.com/v1/analytics/unit-economics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://billing.example.com/v1/analytics/unit-economics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/analytics/unit-economics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {}
}{
"error": {
"code": "validation_failed",
"message": "<string>"
}
}