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>"
      }
    }
  ]
}

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.

groupBy
enum<string>

Group invoice data by dimension. Max 5 groups (top 4 + 'other' when exceeding).

Available options:
plan

Response

Revenue summary data

object
string
required

Object type identifier

Allowed value: "revenue_summary"
netRevenue
string
required

Net collected revenue in dollars (paid invoices + completed payments)

invoices
object
required
payments
object
required
trend
object[]
required

Time-bucketed revenue trend data

groupBreakdown
object[]

Invoice breakdown by group dimension (only present when groupBy is specified)