Skip to main content
GET
Get revenue summary

Authorizations

Authorization
string
header
required

API key authentication

Query Parameters

startTime
string<date-time>
required

Start of the time range (ISO 8601 format)

endTime
string<date-time>
required

End of the time range (ISO 8601 format)

bucketWidth
enum<string>
default:day

Time bucket granularity for trend data

Available options:
hour,
day,
week
merchantId
string

Filter by merchant ID. At least one of merchantId, subscriptionIds, or customerId must be provided. Unique identifier for an organization

Pattern: ^org_[a-zA-Z0-9]+$
customerId
string

Filter by customer ID. At least one of merchantId, subscriptionIds, or customerId must be provided.

subscriptionIds
string[]

Filter by subscription IDs. At least one of merchantId, subscriptionIds, or customerId must be provided.

currency
string

Filter all results to a single ISO 4217 currency code (e.g. 'USD'). When omitted, results include all currencies.

groupBy
enum<string>

Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.

Available options:
plan,
customer,
currency

Response

Revenue summary data

object
string
required

Object type identifier

Allowed value: "revenue_summary"
netRevenue
string

Net collected revenue in dollars (paid invoices + completed payments), already net of non-voided refunds. Omitted when groupBy=currency is active.

totalRefunds
string

Gross total of non-voided refunds (credit notes) issued in the period, in dollars. Already subtracted from netRevenue and invoice totals. Omitted when groupBy=currency is active.

refundCount
number

Number of non-voided refunds (credit notes) issued in the period. Omitted when groupBy=currency is active.

invoices
object

Invoice breakdown. Omitted when groupBy=currency is active.

payments
object

Payment breakdown. Omitted when groupBy=currency is active.

trend
object[]

Time-bucketed revenue trend data. Omitted when groupBy=currency is active.

groupBreakdown
object[]

Invoice breakdown by group dimension (only present when groupBy=plan or groupBy=customer is specified)

currencyBreakdown
object[]

Per-currency revenue aggregates (only present when groupBy=currency is specified). Primary currency appears first, then alphabetical by ISO code. When present, top-level netRevenue, invoices, payments, and trend fields are omitted.