A data connector that integrates Monzo banking data with Dataswyft wallets via the CheckD platform. Features OAuth 2.0 authentication, data extraction, and wallet storage with webhook integration.
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ CheckD Gateway │────│ Monzo Connector │────│ Monzo API │
│ │ │ Service │ │ │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────────┐
│ Dataswyft Wallet │
│ Storage │
└──────────────────┘
- 🔐 Secure Authentication: OAuth 2.0 flow with mobile app approval
- 📊 Complete Data Extraction: Accounts, balances, transactions
- 🌐 Webhook Integration: CheckD platform webhook handling with JWT validation
- 💾 Wallet Storage: Proper application token authentication for Dataswyft wallets
- 🔒 Data Integrity: SHA-256 checksum validation with metadata structure
- 🔄 Async Processing: Background processing with callback support
- 🛡️ Error Handling: Comprehensive error handling and retry logic
- 📈 Monitoring: Health checks and structured logging
- 🧪 Testing: Unit tests and end-to-end integration tests
- Node.js 18+
- Monzo Developer Account
- Dataswyft Wallet Credentials
git clone <repository>
cd monzo-data-connector
npm installCreate .env file:
# Monzo Configuration
MONZO_CLIENT_ID=your_monzo_client_id
MONZO_CLIENT_SECRET=your_monzo_client_secret
MONZO_ACCOUNTS_URL=https://auth.monzo.com
MONZO_API_DOMAIN=https://api.monzo.com
MONZO_SCOPE=read
MONZO_REDIRECT_URI=https://tolocalhost.com/
# Data Connector Configuration
DS_APPLICATION_ID=oi-s-monzodataconnector
DS_NAMESPACE=monzo
DS_DATA_PATH=accounts
# Server Configuration
CONNECTOR_PORT=8080
NODE_ENV=development
LOG_LEVEL=info
# Dataswyft Wallet Configuration
DATASWIFT_API_URL=https://your-instance.hubat.net
DATASWIFT_USERNAME=your_username
DATASWIFT_PASSWORD=your_passwordnpm start
# Server runs on http://localhost:8080Data is stored in the Dataswyft wallet with the following structure:
{
"metadata": {
"inbox_message_id": "unique_message_id_or_null",
"create_at": "2025-08-18T20:09:25.490Z",
"checksum": "1468bddc2e73d22bf3f4e3b6520c1a7f004a90030af6102cd97cef59ef4cab7a"
},
"data": {
"accounts": [/* Your Monzo account data */],
"balances": [/* Your current balance data */],
"transactions": [/* Your transaction history */],
"connectionTest": { "success": true },
"extractionMeta": {
"accountCount": 2,
"balanceCount": 1,
"transactionCount": 0,
"extractedAt": "2025-08-18T20:09:25.490Z",
"connector": "monzo-data-connector"
}
}
}- Checksum: SHA-256 hash computed on the
dataportion for integrity validation - Namespace: Stored in
monzo/accountspath in your Dataswyft wallet - Security: All data encrypted and stored securely in your personal data wallet
GET /health- Service health checkPOST /webhook/connect- Main CheckD webhook endpointGET /test/monzo-auth- OAuth authentication flowGET /test/monzo-data- Data extraction testPOST /test/store-monzo-with-checksum- Store Monzo data with checksum validationGET /test/wallet-connection- Wallet connection test
Due to Monzo's security requirements, OAuth testing must be split into two parts:
npm run test:oauth-part1This will:
- Open your browser for Monzo login
- Request email verification
- Generate access token
⚠️ IMPORTANT: You must then approve data access in your Monzo mobile app
npm run test:oauth-part2 Run this AFTER approving in mobile app. This will:
- Use the approved token
- Extract real banking data from your Monzo account (accounts, balances)
- Apply checksum validation with SHA-256 hash
- Store data in
monzonamespace with integrity metadata - Test callback webhook functionality
- Complete end-to-end flow testing
npm run test:oauth-bothRuns Part 1, waits for your mobile approval, then runs Part 2.
npm run test:unit # Unit tests only
npm run test:integration # Integration tests only
npm run test:all # All testsnpm run test:wallet # Direct wallet API test
npm run test:wallet-monzo # Monzo + wallet integrationsrc/
├── auth/ # Monzo OAuth authentication
├── connectors/ # Monzo API integration
├── gateway/ # CheckD webhook handling
├── storage/ # Dataswyft wallet client
├── utils/ # Logging, error handling
├── config/ # Environment configuration
└── __tests__/ # Integration tests
The connector is designed to work with the CheckD platform via webhook integration:
POST /webhook/connect
Authorization: Bearer {jwt_token}
Content-Type: application/json
{
"data": "user@example.com",
"async": true,
"callback_url": "https://your-callback-url.com/callback"
}Private - Internal use only