Endpoints
GET /v1/wallets/:id/stats
Returns aggregated statistics for a single wallet. No query parameters required.
Example response
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. TheuseEffect hook below starts polling on mount and clears the interval when the component unmounts.
intervalMs milliseconds. The cleanup function returned from useEffect cancels the interval when the component unmounts, preventing memory leaks and stale state updates.