> ## Documentation Index
> Fetch the complete documentation index at: https://test-docs.upayments.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reports

> Generate and retrieve reports

# Reports API

## Generate Report

```bash theme={null}
POST /api/reports/generate
```

```json theme={null}
{
  "reportType": "EXECUTIVE_SUMMARY",
  "merchantId": "clx...",
  "periodStart": "2026-01-01",
  "periodEnd": "2026-03-31",
  "comparisonStart": "2025-01-01",
  "comparisonEnd": "2025-12-31"
}
```

### Report Types

`EXECUTIVE_SUMMARY`, `REVENUE_SUMMARY`, `REVENUE_BY_SOURCE`, `REVENUE_BY_METHOD`, `TRANSACTION_OVERVIEW`, `DECLINE_ANALYSIS`, `SETTLEMENT_REPORT`, `CUSTOMER_ACQUISITION`, `CUSTOMER_LTV`, `TOP_CUSTOMERS`, `INVOICE_AGING`, `INVOICE_COLLECTION`, `SUBSCRIPTION_HEALTH`, `PAYMENT_PAGE_PERFORMANCE`

## List Reports

```bash theme={null}
GET /api/reports?page=1
```

## Get Report

```bash theme={null}
GET /api/reports/:id
```

## Download PDF

```bash theme={null}
GET /api/reports/:id/pdf
```

Returns a PDF file with professional formatting, cover page, and data visualizations.

## Report Schedules

```bash theme={null}
GET /api/reports/schedules
POST /api/reports/schedules
DELETE /api/reports/schedules/:id
```

Configure automated report generation and email delivery.
