OpenapiBilling
Payment statistics for the admin statistics page.
Counts only finalized attempts (Succeeded/Failed) attributed to their initiation day (`created_at`). Requires the `billing.view` permission.
GET
Counts only finalized attempts (Succeeded/Failed) attributed to their
initiation day (created_at). Requires the billing.view permission.
bearer_authheader
AuthorizationBearer <token>days?|Statistics window in days; only 7 or 30 are accepted. Defaults to 7.
Format
int32Payment statistics for the requested window
application/json- response
Payment statistics over a fixed window. The success rate is derived on the client from succeeded / (succeeded + failed); amounts are grouped per currency and never summed across currencies.
amountsByCurrency*array<>failedCount*integerFormat
int64paymentTrend*array<>providers*array<>succeededCount*integerFormat
int64windowDays*integerFormat
int32curl -X GET 'https://example.com/api/bill/stats/payments'Example Response
{
"amountsByCurrency": [
{
"amount": 0,
"currency": "string"
}
],
"failedCount": 0,
"paymentTrend": [
{
"date": "string",
"failedCount": 0,
"succeededCount": 0
}
],
"providers": [
{
"amountsByCurrency": [
{
"amount": 0,
"currency": "string"
}
],
"failedCount": 0,
"paymentProvider": "string",
"succeededCount": 0
}
],
"succeededCount": 0,
"windowDays": 0
}