API Reference (Max only)
Stats

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.5 means $99.50, not 99 cents). This matches the dashboard charts. Plan to pass the values through your own formatter rather than the /100 rule 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

FieldTypeDescription
totalRevenuenumberSum of all completed invoice amounts, lifetime.
monthsRevenuenumberSum of completed invoice amounts in the last 30 days.
subscriptionCountintegerCount of active, non-free subscriptions.
freeTrialCountintegerCount of active free-trial subscriptions.
salesCountintegerLifetime count of completed invoices.
customerCountintegerNumber of unique customers with at least one active subscription.
churnRatenumberPercentage 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

ParameterTypeRequiredDescription
startstringYesStart of the window (ISO 8601, UTC).
endstringYesEnd of the window (ISO 8601, UTC). Window cannot exceed 365 days.
granularitystringNoOne of daily (default), weekly, monthly.
productIdintegerNoRestrict 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

FieldTypeDescription
totalRevenuenumberTotal revenue in the window.
stripeRevenuenumberRevenue from Stripe payments in the window.
cryptoRevenuenumberRevenue from crypto payments in the window.
mrrnumberMonthly Recurring Revenue at the end of the window.
arrnumberAnnual Recurring Revenue at the end of the window.
newSubscribersintegerNew non-free subscriptions started in the window.
churnedSubscribersintegerNon-free subscriptions that expired in the window.
salesCountintegerCompleted invoices in the window.

Comparisons (vs. the previous window of equal length)

FieldTypeDescription
revenueGrowthnumberPercentage change in totalRevenue.
subscriberGrowthnumberPercentage change in newSubscribers.
salesGrowthnumberPercentage change in salesCount.
prevTotalRevenuenumbertotalRevenue from the previous window.
prevNewSubscribersintegernewSubscribers from the previous window.
prevSalesCountintegersalesCount 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.

FieldTypeDescription
revenueChartData[].datestringBucket label.
revenueChartData[].revenuenumberTotal revenue in this bucket.
revenueChartData[].stripeRevenuenumberStripe revenue in this bucket.
revenueChartData[].cryptoRevenuenumberCrypto revenue in this bucket.
subscriberChartData[].datestringBucket label.
subscriberChartData[].newSubscribersintegerNew non-free subscriptions in this bucket.
subscriberChartData[].churnedSubscribersintegerSubscriptions that expired in this bucket.

Period

FieldTypeDescription
periodStartstringEcho of the start parameter (ISO 8601).
periodEndstringEcho of the end parameter (ISO 8601).

Errors

StatusCodeWhen
400invalid_requestMissing start or end, invalid date format, end before start, or window exceeds 365 days.
400invalid_requestgranularity is not one of daily, weekly, monthly.