9:41
📶 🔋

Spending Analysis

Track your financial insights

Total Balance

SAR 24,500.75

Account: ****3001

This Month

Spending by Category

💳

Payments

15 transactions

SAR 3,250

+12%

🔄

Transfers

8 transactions

SAR 1,500

-5%

📱

Digital Wallet

23 transactions

SAR 890

+8%

Recent Transactions

Starbucks

Today, 9:15 AM

-SAR 25

Salary Deposit

Jul 25, 2:00 PM

+SAR 15,000

Careem

Jul 24, 7:30 PM

-SAR 45

API Integration Points

GET ACCOUNT BALANCE API

Account Balance Display

Fetches real-time balance using:

POST /sandbox/api/v1/customers/accounts/balance

Request: {idNumber, accountNumber}

Response: balance, availableBalance, currency

Updates every time user opens app or pulls to refresh

GET ACCOUNT TRANSACTIONS API

Monthly Spending Chart

Aggregates transaction data using:

POST /sandbox/api/v1/transfers/transactions

Request: {accountId, fromDate, toDate, limit: 100}

Processing: Groups by day, calculates daily totals

Chart updates when user changes month selection

TRANSACTION CATEGORIZATION

Spending Categories

Analyzes transactions by type:

transactionType: PAYMENT | TRANSFER | TOPUP | WITHDRAWAL

Data Source: Same transaction API

Processing: Filter by type, sum amounts

Comparison: Calculate % change vs last month

TRANSACTION HISTORY API

Recent Transactions List

Displays latest transactions:

POST /sandbox/api/v1/transfers/transactions

Request: {limit: 10, offset: 0, status: COMPLETED}

Display: description, amount, timestamp

"View All" loads full transaction history page

EXPORT REPORT API

Export & Reports (Settings)

Generate downloadable reports:

POST /sandbox/api/v1/reports/export

Formats: JSON, CSV, PDF, EXCEL

Types: TRANSACTION_HISTORY, ACCOUNT_STATEMENT

Users can export data for tax or budgeting purposes

🚀 Quick Implementation Notes

  • ✓ All APIs require Bearer token authentication
  • ✓ Use pagination for large transaction sets (limit/offset)
  • ✓ Cache balance data with 1-minute TTL
  • ✓ Implement pull-to-refresh for real-time updates
  • ✓ Store transaction data locally for offline viewing