Admin Dashboard — Payments Overview
Admin Dashboard — Payments Overview
The Calmony Pay admin dashboard provides a centralised view of your payment operations. It is available to authenticated admin users and surfaces key metrics without requiring direct database or API access.
Accessing the Dashboard
The dashboard is protected by NextAuth. You must be signed in with an authorised admin account to view it. Unauthenticated requests are automatically redirected to the sign-in page.
Dashboard Sections
Revenue Summary Cards
At the top of the dashboard, two summary cards provide an instant health-check of your payment volume:
| Card | Description |
|---|---|
| Total Revenue | Sum of all payment intents with a succeeded status |
| Payment Count | Total number of payment intents recorded |
Only payment intents with a
succeededstatus contribute to the Total Revenue figure. Payments inprocessing,failed, or any other state are excluded from this sum.
Recent Payments List
A table of the most recent payment intents is displayed below the summary cards. Each row includes:
- Payment identifier
- Amount and currency
- Creation timestamp
- Status badge — colour-coded indicator for the current payment state:
succeeded— payment completed successfullyprocessing— payment is in flightfailed— payment was declined or errored
30-Day Revenue Chart
A time-series chart plots daily revenue over the last 30 days. Use this to:
- Identify day-of-week patterns in payment volume
- Spot unexpected drops or spikes in revenue
- Track the impact of product or pricing changes over time
The chart is scoped to succeeded payment intents only, consistent with the Total Revenue card.
Data Layer
All dashboard data is served through tRPC queries. This means:
- Requests are fully type-safe between the server and the client
- No raw REST calls are made from the dashboard UI
- Query results can be extended by adding new tRPC procedures without breaking existing consumers
Permissions
Access to the dashboard is gated at the route level via NextAuth session checks. Ensure the authenticated user's session is valid and that the user has the appropriate admin role configured in your NextAuth callbacks.