v2

latestOpenAPI 3.0.0Commercial2026-07-2649110209.4 KB
Stats

Get store metrics summary

Retrieve aggregated store metrics including counts, revenue, and MRR. When startDate and endDate are provided, totals are filtered to that date range. When interval is also provided, the response includes a periods array with time-series data points grouped by that interval. The periods array starts from the store's first transaction or startDate, whichever is later, to avoid empty leading buckets. All monetary amounts are in cents (integer, no decimals).

get/v1/stats/summary

Query parameters

startDatenumber

Start of the date range as a Unix timestamp in milliseconds (e.g. 1740614400000). When provided with endDate, filters totals to this range. Required when interval is specified.

endDatenumber

End of the date range as a Unix timestamp in milliseconds (e.g. 1772150400000). When provided with startDate, filters totals to this range. Required when interval is specified.

interval'day' | 'week' | 'month'

Groups time-series data into buckets of this size. Requires startDate and endDate. Returns a periods array with one entry per bucket containing grossRevenue and netRevenue.

currency'EUR' | 'USD' required

Response

Successfully retrieved store metrics summary

Example response

{
  "totals": {
    "totalProducts": 12,
    "totalSubscriptions": 48,
    "totalCustomers": 35,
    "totalPayments": 62,
    "activeSubscriptions": 21,
    "totalRevenue": 553939,
    "totalNetRevenue": 478094,
    "netMonthlyRecurringRevenue": 89500,
    "monthlyRecurringRevenue": 94200
  },
  "periods": [
    {
      "timestamp": 1763337600000,
      "grossRevenue": 2999,
      "netRevenue": 2909
    },
    {
      "timestamp": 1763942400000,
      "grossRevenue": 32989,
      "netRevenue": 31998
    },
    {
      "timestamp": 1764547200000,
      "grossRevenue": 47984,
      "netRevenue": 46542
    },
    {
      "timestamp": 1765152000000,
      "grossRevenue": 125958,
      "netRevenue": 122173
    },
    {
      "timestamp": 1765756800000,
      "grossRevenue": 343968,
      "netRevenue": 278372
    },
    {
      "timestamp": 1766361600000,
      "grossRevenue": 0,
      "netRevenue": 0
    },
    {
      "timestamp": 1766966400000,
      "grossRevenue": 0,
      "netRevenue": 0
    },
    {
      "timestamp": 1767571200000,
      "grossRevenue": 225240,
      "netRevenue": 192096
    }
  ]
}