reports
Stable. Describes behaviour that is built and covered by tests in this repository.
GET /v1/reports/revenue #
Invoices summed by period, payment provider, customer country and currency (currencies are never added together)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | First period, YYYY-MM |
to | query | string | Last period, YYYY-MM |
group_by | query | string | Comma-separated: period, provider, country (default period). Currency is always split |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | GetRevenueReportResponse |
400 | Error envelope | Error |
Example response
{
"rows": [
{
"period": "string",
"provider": "string",
"country": "string",
"currency": "string",
"invoices": "string",
"billed_minor": "string",
"collected_minor": "string",
"refunded_minor": "string",
"outstanding_minor": "string",
"uncollectible_minor": "string",
"void_minor": "string",
"credited_minor": "string"
}
]
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/reports/revenue \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"GET /v1/reports/dunning #
Invoices whose payment has not gone through (declined and retrying, outcome unknown, given up)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | GetDunningReportResponse |
400 | Error envelope | Error |
Example response
{
"invoices": [
{
"invoice_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
"number": "string",
"customer_external_id": "string",
"period": "string",
"provider": "string",
"currency": "string",
"total_minor": "string",
"state": "PAYMENT_DECLINED",
"dunning_attempt": 1,
"next_attempt_time": "2026-11-03T10:15:00Z",
"last_error": "string"
}
],
"summary": [
{
"state": "string",
"provider": "string",
"currency": "string",
"invoices": "string",
"total_minor": "string"
}
]
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/reports/dunning \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"GET /v1/reports/subscriptions #
Subscriptions and monthly recurring revenue at the end of a month, with the new and the churned, by provider, country and currency
Parameters
| Name | In | Type | Description |
|---|---|---|---|
month | query | string | YYYY-MM in the tenant's time zone; default the current month |
group_by | query | string | Comma-separated: provider, country. Currency is always split |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | OK | GetSubscriptionReportResponse |
400 | Error envelope | Error |
Example response
{
"month": "string",
"rows": [
{
"provider": "string",
"country": "string",
"currency": "string",
"active": "string",
"trialing": "string",
"paused": "string",
"past_due": "string",
"mrr_minor": "string",
"new_subscriptions": "string",
"new_mrr_minor": "string",
"churned": "string",
"churned_mrr_minor": "string",
"plan_code": "string"
}
]
}curl
curl -X GET https://YOUR-API-ADDRESS/v1/reports/subscriptions \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"Models
Error
| Field | Type | Description |
|---|---|---|
error required | object |
GetDunningReportInvoice
| Field | Type | Description |
|---|---|---|
invoice_id required | string · uuid | |
number required | string | |
customer_external_id required | string | |
period required | string | |
provider required | string | |
currency required | string | |
total_minor required | string · int64 | |
state required | PAYMENT_DECLINED | PAYMENT_UNKNOWN | PAYMENT_PENDING | PAYMENT_ACTION_REQUIRED | PAYMENT_HELD | UNCOLLECTIBLE | |
dunning_attempt required | integer | |
next_attempt_time required | string · date-time | |
last_error required | string |
GetDunningReportResponse
| Field | Type | Description |
|---|---|---|
invoices required | array of GetDunningReportInvoice | |
summary required | array of GetDunningReportSummary |
GetDunningReportSummary
| Field | Type | Description |
|---|---|---|
state required | string | |
provider required | string | |
currency required | string | |
invoices required | string · int64 | |
total_minor required | string · int64 |
GetRevenueReportResponse
| Field | Type | Description |
|---|---|---|
rows required | array of GetRevenueReportRow |
GetRevenueReportRow
| Field | Type | Description |
|---|---|---|
period required | string | |
provider required | string | |
country required | string | |
currency required | string | |
invoices required | string · int64 | |
billed_minor required | string | Finalized invoices that are not void, format: int64 |
collected_minor required | string | Paid, format: int64 |
refunded_minor required | string | Invoices that were refunded, format: int64 |
outstanding_minor required | string | Open, format: int64 |
uncollectible_minor required | string · int64 | |
void_minor required | string · int64 | |
credited_minor required | string | Credit notes issued against these invoices, format: int64 |
GetSubscriptionReportResponse
| Field | Type | Description |
|---|---|---|
month required | string | |
rows required | array of GetSubscriptionReportRow |
GetSubscriptionReportRow
| Field | Type | Description |
|---|---|---|
provider required | string | |
country required | string | |
currency required | string | |
active required | string · int64 | |
trialing required | string · int64 | |
paused required | string · int64 | |
past_due required | string · int64 | |
mrr_minor required | string | Fixed fees per month of active and past due subscriptions, format: int64 |
new_subscriptions required | string · int64 | |
new_mrr_minor required | string · int64 | |
churned required | string | Ended with no successor; a plan change or provider migration is not churn, format: int64 |
churned_mrr_minor required | string · int64 | |
plan_code required | string |