Skip to main content
The stats endpoint gives you a pre-aggregated spend summary for a wallet — perfect for building a dashboard overview card without aggregating transactions yourself. A single request returns the current balance, configured spend limits, and how much of the period allowance has already been consumed.

Endpoints

GET /v1/wallets/:id/stats

Returns aggregated statistics for a single wallet. No query parameters required. Example response
Stats fields

GET /v1/wallets/:id/transactions

Returns the most recent transactions for a wallet. Use the limit parameter to control how many records come back. Query parameters Each transaction record includes: amount, merchant, decision, reason, and createdAt. Pair this with the stats endpoint to populate both the summary card and the recent activity list in a single render cycle.

React example: stats dashboard card

The component below fetches wallet stats, converts kobo to naira for display, and renders a period-spend progress bar alongside balance and limit information.

Polling for live updates

Axis uses short-polling rather than WebSockets. To keep your dashboard card current, set up a polling interval of 1–2 seconds on the stats endpoint. The useEffect hook below starts polling on mount and clears the interval when the component unmounts.
The hook fetches once immediately, then re-fetches every intervalMs milliseconds. The cleanup function returned from useEffect cancels the interval when the component unmounts, preventing memory leaks and stale state updates.
The stats endpoint gives you the current aggregated balance and spend figures, but if you need the full immutable history of every balance change — top-ups, debits, and refunds — see Query the Axis ledger.