Analytics
Analytics endpoints return pre-aggregated reporting data for your merchant account: summary metrics for payment volume, refunds, payment counts, and new customers; bucketed payment volume; and subscription metrics including MRR, ARR, and subscription status counts. All endpoints are read-only.
Periods#
Every endpoint takes a period. period_start_at is required and period_end_at is optional, both as RFC 3339 timestamps. The period includes its start and excludes its end. An omitted end, or an end in the future, resolves to the request time truncated to the second, and the response echoes the resolved period_start_at and period_end_at.
A period can span at most 400 days, or 32 days with granularity=hour. A start that is not before the resolved end returns 400 INVALID_REQUEST with period_start_at as the parameter, and a period that is too long returns the same error for period_end_at. A query parameter an endpoint doesn't support returns 400 INVALID_REQUEST with detail code UNKNOWN_FIELD and the parameter in param, including range and include_previous_period, which earlier versions accepted.
Analytics does not compare periods. To compare, request a second period and compare the two responses, as Compare two periods shows.
Payment volume buckets#
The payment volume timeseries splits the period into buckets. granularity is hour, day (the default), week, or month, and weeks start on Monday. timezone is an IANA name such as America/New_York, defaults to UTC, and applies only to this endpoint. An invalid timezone returns 400 INVALID_REQUEST with detail code INVALID_VALUE and param: timezone. Sending timezone to the overview or subscriptions endpoint returns 400 INVALID_REQUEST with detail code UNKNOWN_FIELD and param: timezone.
- Bucket boundaries fall on local hours, dates, Mondays, or the first of the month in
timezone. The first and last buckets are clipped to the period, so a bucket'speriod_start_atandperiod_end_atare the clipped instants. - Buckets with no payments are included with a zero
volume_moneyandpayments_count. - When clocks go back, the repeated local hour produces two hourly buckets. When clocks go forward, the skipped hour produces none, and a calendar date that doesn't exist produces no daily bucket.
Currency#
Amounts in different currencies are never added together. volume_money, gross_volume_money, refunded_money, collected_money, mrr_money, arr_money, and payments_count are all in one currency, echoed as currency. Pass currency as a three-letter uppercase ISO 4217 code to choose it; omit it to get your account's default currency. An invalid code returns 400 INVALID_REQUEST with detail code INVALID_VALUE and param: currency.
Customer counts and subscription counts span currencies, because a customer or subscription isn't tied to one. currencies lists the currencies with activity, so you can offer the others as choices and request each one.
Metric definitions#
A payment counts once it has succeeded. Payments, refunds, customers, and subscriptions are selected by their creation time, and canceled subscriptions by their cancellation time.
gross_volume_moneyis the sum of succeeded payments created in the period, andpayments_countis how many there were.refunded_moneyis refunds created in the period that did not fail and were not canceled, whenever the refunded payment was made.new_customers_countcounts customers created in the period.new_subscriptions_countcounts subscriptions created in the period whose current status istrialing,active,paused, orpast_due. Subscriptions waiting for their first payment and canceled subscriptions are excluded, so a past period's count can go down later.canceled_subscriptions_countcounts subscriptions canceled in the period.collected_moneyis subscription payments that succeeded in the period, including recurring charges and setup fees.mrr_moneyis monthly recurring revenue from active and past due subscriptions, with each subscription normalized to a month and rounded separately.arr_moneyismrr_moneytimes 12.status_countsis the number of subscriptions in each status.
The subscription snapshot, which is mrr_money, arr_money, and status_counts, describes your subscriptions as they are now, is cached briefly, and doesn't depend on the period.
The responses don't include net volume or average payment. Derive net volume by subtracting refunded_money from gross_volume_money; it doesn't subtract processing fees or disputes. Derive an average payment by dividing gross_volume_money by payments_count.
Compare two periods#
Request each period separately, using the same currency, and compute the change yourself. This compares October 15 to 21 with the 7 days before it:
curl -G https://api.withflintpay.com/v1/analytics/overview \
-H "Authorization: Bearer $FLINT_API_KEY" \
-d period_start_at=2026-10-15T00:00:00Z \
-d period_end_at=2026-10-22T00:00:00Z \
-d currency=USD
curl -G https://api.withflintpay.com/v1/analytics/overview \
-H "Authorization: Bearer $FLINT_API_KEY" \
-d period_start_at=2026-10-08T00:00:00Z \
-d period_end_at=2026-10-15T00:00:00Z \
-d currency=USD
Because an end is excluded and a start is included, adjacent periods share a boundary without counting a payment twice. To compare a period that is still in progress fairly, end the earlier period at the same point in its own span, such as the same time of day.
For per-event data instead of aggregates, use webhooks or list the underlying resources directly.
Get analytics overview#
/v1/analytics/overviewRequires scope analytics.read
Rate limit: read
Returns high-level merchant analytics for the requested half-open period.
Query parameters
period_start_atstringRequiredInclusive period start as an RFC 3339 instant. The period is [period_start_at, period_end_at), at most 400 days, or 32 days for hour granularity.
period_end_atstringExclusive period end as an RFC 3339 instant. Omitted or future values resolve to the request time, truncated to the second.
currencystringISO 4217 currency for every amount and payments_count. Defaults to the merchant's default currency. Customer and subscription counts span currencies. currencies lists the available currencies.
Response · 200
The analytics overview.
dataobjectRequiredResource, collection, or operation result returned by this request.
currenciesarray of stringRequiredCurrencies of succeeded payments selected by payment created_at or counted refunds selected by refund created_at in the period, regardless of the currency filter. Empty when neither has rows. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
currencystringRequiredISO 4217 currency for amounts and payment counts. Defaults to the merchant's default currency. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
gross_volume_moneyobjectRequiredSum of succeeded payment amounts selected by payment created_at in the period, in currency. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
new_customers_countintegerRequiredCustomers selected by customer created_at in the period, across all currencies. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
payments_countintegerRequiredSucceeded payments selected by payment created_at in the period, restricted to currency. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
period_end_atstringRequiredExclusive resolved end instant. Omitted or future request ends resolve to the request time truncated to the second. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
period_start_atstringRequiredInclusive start instant. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
refunded_moneyobjectRequiredRefund amounts selected by refund created_at in the period, excluding failed and canceled refunds. Parent refunds with child executions count through the children once, regardless of payment creation time. Uses currency. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl "https://api.withflintpay.com/v1/analytics/overview?period_start_at=2026-08-02T16:00:00Z" \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The analytics overview.
{
"data": {
"currencies": [
"USD"
],
"currency": "USD",
"gross_volume_money": {
"amount": 125000,
"currency": "USD"
},
"new_customers_count": 9,
"payments_count": 48,
"period_end_at": "2026-03-03T00:00:00Z",
"period_start_at": "2026-03-01T00:00:00Z",
"refunded_money": {
"amount": 1000,
"currency": "USD"
}
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6M69N2X15R3VN1SHMMFDV"
}Get payment volume timeseries#
/v1/analytics/payment-volume-timeseriesRequires scope analytics.read
Rate limit: read
Returns merchant payment volume buckets for the requested half-open period.
Query parameters
period_start_atstringRequiredInclusive period start as an RFC 3339 instant. The period is [period_start_at, period_end_at), at most 400 days, or 32 days for hour granularity.
period_end_atstringExclusive period end as an RFC 3339 instant. Omitted or future values resolve to the request time, truncated to the second.
currencystringISO 4217 currency for every amount and payments_count. Defaults to the merchant's default currency. Customer and subscription counts span currencies. currencies lists the available currencies.
granularityenumBucket size: hour, day (default), week starting Monday, or month. Buckets follow local boundaries, clipped to the period. Repeated hours have two buckets; skipped hours and days have none. Empty buckets are included.
hourdayweekmonth
timezonestringIANA timezone for bucket boundaries. Defaults to UTC.
Response · 200
The payment volume timeseries.
dataobjectRequiredResource, collection, or operation result returned by this request.
bucketsarray of objectRequiredPayment created_at buckets clipped to the period, including empty buckets. Repeated local hours produce two buckets; skipped hours and days produce none. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
currenciesarray of stringRequiredCurrencies of succeeded payments selected by payment created_at or counted refunds selected by refund created_at in the period, regardless of the currency filter. Empty when neither has rows. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
currencystringRequiredISO 4217 currency for amounts and payment counts. Defaults to the merchant's default currency. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
granularityenumRequiredLocal bucket size: hour, day, week starting Monday, or month. Defaults to day. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
hourdayweekmonth
period_end_atstringRequiredExclusive resolved end instant. Omitted or future request ends resolve to the request time truncated to the second. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
period_start_atstringRequiredInclusive start instant. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
timezonestringRequiredIANA timezone used only for local bucket boundaries. Defaults to UTC. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl "https://api.withflintpay.com/v1/analytics/payment-volume-timeseries?period_start_at=2026-08-02T16:00:00Z" \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The payment volume timeseries.
{
"data": {
"buckets": [
{
"payments_count": 7,
"period_end_at": "2026-03-11T04:00:00Z",
"period_start_at": "2026-03-10T04:00:00Z",
"volume_money": {
"amount": 18000,
"currency": "USD"
}
},
{
"payments_count": 9,
"period_end_at": "2026-03-12T04:00:00Z",
"period_start_at": "2026-03-11T04:00:00Z",
"volume_money": {
"amount": 22000,
"currency": "USD"
}
}
],
"currencies": [
"USD"
],
"currency": "USD",
"granularity": "day",
"period_end_at": "2026-03-12T04:00:00Z",
"period_start_at": "2026-03-10T04:00:00Z",
"timezone": "America/New_York"
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6PPFS788MY3WZKMAXHDZ8"
}Get subscription analytics#
/v1/analytics/subscriptionsRequires scope analytics.read
Rate limit: read
Returns windowed subscription metrics plus current subscription snapshot metrics.
Query parameters
period_start_atstringRequiredInclusive period start as an RFC 3339 instant. The period is [period_start_at, period_end_at), at most 400 days, or 32 days for hour granularity.
period_end_atstringExclusive period end as an RFC 3339 instant. Omitted or future values resolve to the request time, truncated to the second.
currencystringISO 4217 currency for every amount and payments_count. Defaults to the merchant's default currency. Customer and subscription counts span currencies. currencies lists the available currencies.
Response · 200
The subscription analytics payload.
dataobjectRequiredResource, collection, or operation result returned by this request.
currenciesarray of stringRequiredCurrencies of subscription payments selected by succeeded activity created_at in the period, plus current active and past_due billing snapshots, regardless of the currency filter. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
currencystringRequiredISO 4217 currency for amounts and payment counts. Defaults to the merchant's default currency. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
period_end_atstringRequiredExclusive resolved end instant. Omitted or future request ends resolve to the request time truncated to the second. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
period_start_atstringRequiredInclusive start instant. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
snapshot_metricsobjectRequiredCurrent persisted subscription state at computation time, cached briefly. Independent of the requested period end. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
window_metricsobjectRequiredSubscription creation, cancellation, and payment success metrics selected within the requested period. The half-open period [period_start_at, period_end_at) includes its start and excludes its end. Amounts and payments_count use currency; customer and subscription counts span currencies.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl "https://api.withflintpay.com/v1/analytics/subscriptions?period_start_at=2026-08-02T16:00:00Z" \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The subscription analytics payload.
{
"data": {
"currencies": [
"USD"
],
"currency": "USD",
"period_end_at": "2026-03-03T00:00:00Z",
"period_start_at": "2026-03-01T00:00:00Z",
"snapshot_metrics": {
"arr_money": {
"amount": 1558800,
"currency": "USD"
},
"mrr_money": {
"amount": 129900,
"currency": "USD"
},
"status_counts": {
"active_count": 42,
"canceled_count": 18,
"incomplete_count": 4,
"past_due_count": 3,
"paused_count": 2,
"scheduled_count": 2,
"trialing_count": 5
}
},
"window_metrics": {
"canceled_subscriptions_count": 3,
"collected_money": {
"amount": 485000,
"currency": "USD"
},
"new_subscriptions_count": 14
}
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6N45CBA9JBB8EXZG0MXHW"
}Was this helpful?
