Stats
Aggregated metrics for your server. Use these endpoints to power dashboards, reporting, and alerts.
Cached for 60 seconds. Both stats endpoints cache their response per API key for one minute. If you call the same endpoint with the same parameters more than once a minute, you'll see the cached result. This protects the database from expensive aggregations during burst traffic.
Aggregates are floats. Unlike the rest of the API, stats responses report monetary values as decimal numbers in the major unit of your store currency (e.g.
99.5means $99.50, not 99 cents). This matches the dashboard charts. Plan to pass the values through your own formatter rather than the/100rule used elsewhere.
GET /v1/stats/overview
Headline numbers for your server, computed across the entire history.
Tier: C · Auth: required · Idempotent: N/A · Cache: 60s
Request
curl https://subscord.com/api/v1/stats/overview \
-H "Authorization: Bearer ssk_live_..."This endpoint takes no query parameters.
Response — 200 OK
{
"totalRevenue": 12453.5,
"monthsRevenue": 1820.0,
"subscriptionCount": 184,
"freeTrialCount": 12,
"salesCount": 612,
"customerCount": 173,
"churnRate": 4.2
}Fields
| Field | Type | Description |
|---|---|---|
totalRevenue | number | Sum of all completed invoice amounts, lifetime. |
monthsRevenue | number | Sum of completed invoice amounts in the last 30 days. |
subscriptionCount | integer | Count of active, non-free subscriptions. |
freeTrialCount | integer | Count of active free-trial subscriptions. |
salesCount | integer | Lifetime count of completed invoices. |
customerCount | integer | Number of unique customers with at least one active subscription. |
churnRate | number | Percentage churn rate (e.g. 4.2 = 4.2%). |
GET /v1/stats/timeseries
Revenue and subscriber data over a time window, bucketed by day, week, or month.
Tier: C · Auth: required · Idempotent: N/A · Cache: 60s
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
start | string | Yes | Start of the window (ISO 8601, UTC). |
end | string | Yes | End of the window (ISO 8601, UTC). Window cannot exceed 365 days. |
granularity | string | No | One of daily (default), weekly, monthly. |
productId | integer | No | Restrict subscriber stats to a single product. |
Request
curl "https://subscord.com/api/v1/stats/timeseries?start=2026-01-01T00:00:00Z&end=2026-04-01T00:00:00Z&granularity=weekly" \
-H "Authorization: Bearer ssk_live_..."Response — 200 OK
{
"totalRevenue": 4823.75,
"stripeRevenue": 4012.5,
"cryptoRevenue": 811.25,
"mrr": 1632.0,
"arr": 19584.0,
"newSubscribers": 87,
"churnedSubscribers": 19,
"salesCount": 142,
"revenueGrowth": 12.4,
"subscriberGrowth": 8.1,
"salesGrowth": 5.3,
"prevTotalRevenue": 4292.0,
"prevNewSubscribers": 80,
"prevSalesCount": 135,
"revenueChartData": [
{
"date": "Jan 1",
"revenue": 320.5,
"stripeRevenue": 280.0,
"cryptoRevenue": 40.5
}
],
"subscriberChartData": [
{
"date": "Jan 1",
"newSubscribers": 7,
"churnedSubscribers": 2
}
],
"periodStart": "2026-01-01T00:00:00.000Z",
"periodEnd": "2026-04-01T00:00:00.000Z"
}Fields
Summary
| Field | Type | Description |
|---|---|---|
totalRevenue | number | Total revenue in the window. |
stripeRevenue | number | Revenue from Stripe payments in the window. |
cryptoRevenue | number | Revenue from crypto payments in the window. |
mrr | number | Monthly Recurring Revenue at the end of the window. |
arr | number | Annual Recurring Revenue at the end of the window. |
newSubscribers | integer | New non-free subscriptions started in the window. |
churnedSubscribers | integer | Non-free subscriptions that expired in the window. |
salesCount | integer | Completed invoices in the window. |
Comparisons (vs. the previous window of equal length)
| Field | Type | Description |
|---|---|---|
revenueGrowth | number | Percentage change in totalRevenue. |
subscriberGrowth | number | Percentage change in newSubscribers. |
salesGrowth | number | Percentage change in salesCount. |
prevTotalRevenue | number | totalRevenue from the previous window. |
prevNewSubscribers | integer | newSubscribers from the previous window. |
prevSalesCount | integer | salesCount from the previous window. |
Chart series
revenueChartData and subscriberChartData are arrays of buckets, one entry per granularity step within the window. The date string is a human-readable label such as "Jan 1", "Week of Jan 3", or "Jan 2026" depending on granularity.
| Field | Type | Description |
|---|---|---|
revenueChartData[].date | string | Bucket label. |
revenueChartData[].revenue | number | Total revenue in this bucket. |
revenueChartData[].stripeRevenue | number | Stripe revenue in this bucket. |
revenueChartData[].cryptoRevenue | number | Crypto revenue in this bucket. |
subscriberChartData[].date | string | Bucket label. |
subscriberChartData[].newSubscribers | integer | New non-free subscriptions in this bucket. |
subscriberChartData[].churnedSubscribers | integer | Subscriptions that expired in this bucket. |
Period
| Field | Type | Description |
|---|---|---|
periodStart | string | Echo of the start parameter (ISO 8601). |
periodEnd | string | Echo of the end parameter (ISO 8601). |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Missing start or end, invalid date format, end before start, or window exceeds 365 days. |
| 400 | invalid_request | granularity is not one of daily, weekly, monthly. |