# Payment analytics and exports

> See checkout revenue by day, by the token and chain customers paid with, and by settlement in the dashboard, with conversion, refunds and time to pay, and export your sessions as CSV for accounting.

Source: https://docs.layerhop.com/guides/analytics

The dashboard's **Payments → Analytics** page summarizes your [checkout](/guides/checkout) payments over a date range: gross and net revenue, refunds, number of payments, average payment, conversion and time to pay, revenue per day, what your customers paid with, and what you were paid in. Every payment link, [product](/guides/payment-buttons), [invoice](/guides/invoices) and API-created session counts. You can also download the sessions behind the numbers as a CSV file for your accounting.

Settlement tokens are USD stablecoins (USDC and USDT), so amounts are reported in USD (`…Usd` fields, rounded to cents). Live and test data are separate: turn on **Test mode** in the dashboard to see test sessions.

## What the numbers mean

The range covers sessions **created** in it (default: the last 30 days; at most 366 days). Payments are sessions that reached `paid`.

| Metric | Meaning |
|---|---|
| `sessions` | Sessions created in the range, whatever their status. |
| `payments` | Of those, sessions that are `paid`. |
| `grossUsd` | Total `amount` of paid sessions. |
| `refundedUsd` | Total completed [refunds](/guides/refunds) (`refundedAmount`) of those sessions. |
| `netUsd` | `grossUsd − refundedUsd`. |
| `averageUsd` | `grossUsd / payments`. |
| `conversionRate` | Percentage of sessions that were paid (one decimal), or `null` without sessions. |
| `medianSecondsToPay`, `averageSecondsToPay` | Time from session creation to verified payment. |

The per-day series (`byDay`) is by **payment** date (UTC) and has one entry per day of the range, including days without payments. `byPaidWith` groups revenue by the chain and token customers paid with, and `bySettlement` by the chain and stablecoin you received; both are sorted by revenue.

## The analytics endpoint

The dashboard reads `GET /v1/dashboard/checkout/analytics`, authenticated with your dashboard sign-in session (not an API key).

| Query | Notes |
|---|---|
| `from`, `to` | ISO 8601 dates or timestamps, or Unix seconds. Default: the 30 days up to now. `from` must be before `to`; at most 366 days. |
| `mode` | `live` (default) or `test`. |

```json
{
  "livemode": true,
  "from": "2026-09-18T00:00:00.000Z",
  "to": "2026-10-18T00:00:00.000Z",
  "totals": {
    "sessions": 214,
    "payments": 163,
    "grossUsd": 8612.5,
    "refundedUsd": 98,
    "netUsd": 8514.5,
    "averageUsd": 52.84,
    "conversionRate": 76.2,
    "medianSecondsToPay": 41,
    "averageSecondsToPay": 73
  },
  "byDay": [
    { "date": "2026-09-18", "payments": 4, "revenueUsd": 196, "refundedUsd": 0 }
  ],
  "byPaidWith": [
    { "chainId": 42161, "chain": "Arbitrum", "token": "0x0000000000000000000000000000000000000000", "payments": 51, "revenueUsd": 2890.25 }
  ],
  "bySettlement": [
    { "chainId": 8453, "chain": "Base", "symbol": "USDC", "payments": 163, "revenueUsd": 8612.5 }
  ]
}
```

## Export sessions as CSV

**Export CSV** on the analytics page downloads `layerhop-payments-{from}-to-{to}.csv` from `GET /v1/dashboard/checkout/analytics/sessions.csv` (same `from`, `to` and `mode`, plus an optional `status`, for example `status=paid` to export payments only). It has one row per session created in the range, newest first, up to 50,000 rows. The file is UTF-8 with CRLF line endings, so it opens directly in Excel, Numbers and Google Sheets.

| Column | Contents |
|---|---|
| `id` | Session id (`cs_…`). |
| `created_at` | When the session was created (ISO 8601, UTC). |
| `status` | `open`, `processing`, `paid`, `expired` or `needs_review`. |
| `amount` | Amount due, in base units of the settlement token. |
| `currency` | Settlement token symbol (`USDC` or `USDT`). |
| `settlement_chain` | Settlement chain name. |
| `amount_usd` | Amount due in USD, two decimals. |
| `refunded` | Completed refunds in USD, two decimals. |
| `description`, `reference` | As set on the session. |
| `product_id`, `invoice_id` | The [product](/guides/payment-buttons) or [invoice](/guides/invoices) the session came from, if any. |
| `payer` | The address that paid. |
| `paid_with_chain`, `paid_with_token`, `paid_with_amount` | What the customer paid with: chain name, token address and amount in that token's base units. |
| `src_tx_hash`, `dst_tx_hash` | The payment transaction and the delivering transaction. |
| `paid_at` | When the payment was verified (ISO 8601, UTC). |
| `livemode` | `true` for live sessions, `false` for test. |

Cells that start with `=`, `+`, `-`, `@` or a tab are prefixed with `'` so a spreadsheet never runs them as formulas.

To pull the same data with an API key instead, page through [`GET /v1/checkout/sessions`](/api-reference#list-checkout-sessions).
