Skip to navigation

Get customer stats

View as MarkdownOpen in Claude

Retrieves the basic statistics for a customer over a date range, grouped by a frequency. This is a Pay In view: it counts the customer’s approved transactions and returns one row per time bucket. Volume here is the gross amount, before fees.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

OR
requestTokenstring

Long-lived API token sent in the requestToken header. See API token authentication.

Path parameters

customerIdintegerRequired

Payabli-generated customer ID. Maps to “Customer ID” column in the Payabli Portal.

freqstringRequired

Frequency to group series. Allowed values:

  • m - monthly
  • w - weekly
  • d - daily
  • h - hourly

For example, w groups the results by week.

modestringRequired

Mode for request. Allowed values:

  • ytd - Year To Date
  • mtd - Month To Date
  • wtd - Week To Date
  • today - All current day
  • m12 - Last 12 months
  • d30 - Last 30 days
  • h24 - Last 24 hours
  • lasty - Last Year
  • lastm - Last Month
  • lastw - Last Week
  • yesterday - Last Day

Response

Success
statXstring

The time bucket for this row, formatted according to the query’s freq (for example, 2026-9 for a monthly bucket). The response returns one object per bucket across the requested range.

inTransactionsinteger
Count of the customer's approved transactions.
inTransactionsVolumedouble

Total gross value of the customer’s approved transactions. Unlike /Statistic/basic, this volume is the gross amount, before fees.

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error
503
Service Unavailable Error