Skip to main content
GET
/
v0
/
revenue
Get revenue summary
curl --request GET \
  --url https://api.paygentic.io/v0/revenue \
  --header 'Authorization: Bearer <token>'
{
  "object": "<string>",
  "netRevenue": "<string>",
  "invoices": {
    "issued": {
      "count": 123,
      "amount": "<string>"
    },
    "outstanding": {
      "count": 123,
      "amount": "<string>"
    },
    "paid": {
      "count": 123,
      "amount": "<string>"
    },
    "writtenOff": {
      "count": 123,
      "amount": "<string>"
    }
  },
  "payments": {
    "completedCount": 123,
    "completedAmount": "<string>",
    "pendingCount": 123,
    "pendingAmount": "<string>",
    "expiredCount": 123,
    "expiredAmount": "<string>"
  },
  "trend": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "issuedInvoices": "<string>",
      "writtenOffInvoices": "<string>",
      "completedPayments": "<string>",
      "groupBreakdown": [
        {
          "groupKey": "<string>",
          "groupLabel": "<string>",
          "issuedInvoices": "<string>"
        }
      ]
    }
  ],
  "groupBreakdown": [
    {
      "groupKey": "<string>",
      "groupLabel": "<string>",
      "outstanding": {
        "count": 123,
        "amount": "<string>"
      },
      "paid": {
        "count": 123,
        "amount": "<string>"
      },
      "writtenOff": {
        "count": 123,
        "amount": "<string>"
      }
    }
  ],
  "currencyBreakdown": [
    {
      "currency": "<string>",
      "netRevenue": "<string>",
      "invoices": {
        "issued": {
          "count": 123,
          "amount": "<string>"
        },
        "outstanding": {
          "count": 123,
          "amount": "<string>"
        },
        "paid": {
          "count": 123,
          "amount": "<string>"
        },
        "writtenOff": {
          "count": 123,
          "amount": "<string>"
        }
      },
      "payments": {
        "completedCount": 123,
        "completedAmount": "<string>",
        "pendingCount": 123,
        "pendingAmount": "<string>",
        "expiredCount": 123,
        "expiredAmount": "<string>"
      },
      "trend": [
        {
          "timestamp": "2023-11-07T05:31:56Z",
          "issuedInvoices": "<string>",
          "writtenOffInvoices": "<string>",
          "completedPayments": "<string>",
          "groupBreakdown": [
            {
              "groupKey": "<string>",
              "groupLabel": "<string>",
              "issuedInvoices": "<string>"
            }
          ]
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt

Use this file to discover all available pages before exploring further.

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). 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.