Track Your UOB Credit Card Subcaps — Simply & Privately
If you're using UOB PPV (Preferred Platinum Visa) or UOB VS (Visa Signature) cards through HeyMax, you know how frustrating it can be to manually track your subcap spend across different categories. Are you hitting your contactless limit? Have you maxed out your online spend bucket? Nobody wants to dig through transaction lists and do mental math just to know where they stand.
This Tampermonkey userscript solves that problem. It automatically tracks your spending across subcap categories and shows you exactly where you are—right when you need it.
What This Script Does for You
Visual Subcap Tracking at a Glance
No more spreadsheets. No more guesswork. When you're viewing your UOB card details on HeyMax, this script adds a floating "Subcaps" button to your page. Click it, and you'll see:
For UOB PPV cardholders:
- Your contactless bucket spend (out of $600 limit)
- Your eligible online transaction spend (out of $600 limit)
For UOB VS cardholders:
- Your contactless bucket spend (out of $1,200 limit)
- Your foreign currency transaction spend (out of $1,200 limit)
The overlay uses color coding to help you understand your status instantly:
- Green: You're on track
- Yellow (UOB VS only): You haven't hit the $1,000 threshold yet to start earning bonus miles
- Red: You've reached or exceeded the limit for this bucket
UOB PPV card subcaps overlay:
![UOB PPV Subcaps Overlay]()
UOB VS card subcaps overlay:
![UOB VS Subcaps Overlay]()
Completely Private & Secure
Your transaction data is sensitive, and this script treats it that way:
- No external requests: The script doesn't send any data outside your browser. Not to us, not to anyone.
- Read-only operation: It only intercepts and reads the transaction data that HeyMax is already loading for you. It doesn't modify anything.
- Local storage only: All calculations happen in your browser, and data is stored locally using Tampermonkey's secure storage.
This isn't some third-party service collecting your spending habits. It's a simple tool that works entirely on your machine, giving you visibility without compromising your privacy.
Supported Cards
- UOB PPV (Preferred Platinum Visa): Tracks contactless and eligible online transaction buckets ($600 limit each)
- UOB VS (Visa Signature): Tracks contactless and foreign currency transaction buckets ($1,200 limit each)
Features
✅ Network Request Monitoring: Monkey patches fetch() and XMLHttpRequest to intercept all network requests
✅ URL and Response Logging: Logs request URLs and response data to browser console
✅ Patch Protection: Monitors to ensure monkey patches aren't overwritten by other scripts
✅ Auto-Recovery: Automatically re-applies patches if they are detected as overwritten (checks every second)
✅ SubCaps Button: Displays a floating "subcaps" button on supported card pages
✅ SubCaps Overlay: Shows calculated SubCaps data in an overlay modal
✅ Multi-Card Support: Automatically detects and displays appropriate SubCaps information for UOB PPV and UOB VS cards
✅ Local Storage: Uses Tampermonkey's GM_getValue/GM_setValue for data persistence
Installation
Prerequisites
Browser Requirements
Install a userscript manager browser extension:
Important: Developer Mode Required
For Chrome and Edge (Desktop & Mobile), you must enable Developer Mode for Tampermonkey to intercept network requests:
Chrome:
- Go to
chrome://extensions/
- Toggle on "Developer mode" in the top-right corner
- Restart Chrome
Edge Desktop:
- Go to
edge://extensions/
- Toggle on "Developer mode" in the bottom-left corner
- Restart Edge
Edge Mobile (Android):
- Open Edge, tap the three dots (⋯) menu
- Go to Extensions → Manage extensions
- Toggle on "Developer mode"
- Restart Edge
Why is this needed? Developer mode allows Tampermonkey to access advanced APIs needed for monkey-patching fetch() and XMLHttpRequest to intercept network traffic. Without it, the script won't be able to capture your transaction data.
Additional Configuration Guides
For optimal performance, you may need to configure Tampermonkey to run properly:
Key settings to check in Tampermonkey:
- Config → "Allow access to file URLs": Not required for this script
- Config → "Inject Mode": Should be set to "Auto" or "Instant"
- Site-specific permissions: Ensure Tampermonkey has permission to run on
heymax.ai
Installation Steps
- Install Tampermonkey from the links above for your browser
- Enable Developer Mode (Chrome/Edge users only - see instructions above)
- Click on the Tampermonkey icon in your browser toolbar
- Select "Create a new script..."
- Delete the default template
- Copy the entire contents of
heymax-subcaps-viewer.user.js
- Paste it into the Tampermonkey editor
- Click File → Save (or press Ctrl+S / Cmd+S)
- Navigate to https://heymax.ai/cards/your-cards/ and the script will activate automatically
Verification
To verify the script is working:
- Open browser console (F12 or Ctrl+Shift+I / Cmd+Option+I)
- Navigate to a card detail page on HeyMax
- Look for
[HeyMax SubCaps Viewer] log messages
- The "Subcaps" button should appear in the bottom-right corner (for supported cards)
Usage
Once installed, the script will automatically:
- Monitor all network requests on https://heymax.ai/cards/your-cards/* pages
- Intercept and log API responses to the browser console
- Store transaction data in Tampermonkey's storage
- Display a "subcaps" button on supported card detail pages (UOB PPV or UOB VS)
- Show calculated SubCaps data when you click the button
Viewing SubCaps Data
- Navigate to a supported card detail page (e.g., https://heymax.ai/cards/your-cards/[card-id])
- Wait for the page to load and make API calls to fetch card and transaction data
- Once data is loaded, a green "subcaps" button will appear in the bottom-right corner
- Click the button to view your SubCaps analysis in an overlay modal
- The modal shows:
- Total transactions analyzed
- Contactless bucket amount and limit
- Online bucket (UOB PPV) or Foreign Currency bucket (UOB VS) amount and limit
The overlay uses color coding to help you understand your status instantly:
- Green: You're on track
- Yellow (UOB VS only): You haven't hit the $1,000 threshold yet to start earning bonus miles
- Red: You've reached or exceeded the limit for this bucket
UOB PPV card subcaps overlay:
![UOB PPV Subcaps Overlay]()
UOB VS card subcaps overlay:
![UOB VS Subcaps Overlay]()
Viewing Console Logs
Open the browser console (F12 or Ctrl+Shift+I) to see:
- Network request interception logs
- API response data
- Storage operations
- Button visibility checks
Technical Implementation
Network Monitoring
The script intercepts network requests by:
- Storing references to original
fetch() and XMLHttpRequest methods
- Replacing them with patched versions that log API responses
- Monitoring every second to detect if patches are overwritten
- Automatically restoring patches if tampering is detected
Data Storage
The script uses Tampermonkey's GM_getValue and GM_setValue to store API data in a structure organized by card ID:
cardData: {
"7a30eab609ef58b841232633342ce19a": {
"transactions": { data: {...}, timestamp: "2025-11-03T12:00:00.000Z", url: "...", status: 200 },
"summary": { data: {...}, timestamp: "2025-11-03T12:00:00.000Z", url: "...", status: 200 },
"card_tracker": { data: {...}, timestamp: "2025-11-03T12:00:00.000Z", url: "...", status: 200 }
}
}
Each card ID maintains the latest values for:
- transactions: Latest transaction data for that card
- summary: Latest summary data for that card
- card_tracker: Card tracker data for that specific card (when viewed on detail pages like
/details or /reward-cycles)
SubCaps Calculation Logic
The script calculates SubCaps based on card-specific rules:
UOB PPV (Preferred Platinum Visa)
- Contactless bucket: Contactless transactions rounded down to nearest $5 (max $600)
- Online bucket: Eligible online transactions (specific MCC codes) rounded down to nearest $5 (max $600)
UOB VS (Visa Signature)
- Contactless bucket: Contactless transactions (excluding those counted in foreign currency bucket) (max $1,200)
- Foreign Currency bucket: Non-SGD transactions (takes priority over contactless) (max $1,200)
- Threshold: Requires spending at least $1,000 in a bucket to earn bonus miles
Transaction Filtering
Transactions are filtered to exclude:
- Blacklisted MCC codes (bill payments, government services, etc.)
- Blacklisted merchant name prefixes (transit, forex, etc.)
Comparison with Chrome Extension
| Feature |
Chrome Extension |
Tampermonkey Script |
| Network monitoring |
✅ |
✅ |
| API response logging |
✅ |
✅ |
| Patch protection |
✅ |
✅ |
| SubCaps button |
✅ |
✅ |
| SubCaps calculation |
✅ |
✅ |
| Data persistence |
Chrome Storage API |
Tampermonkey GM storage |
| Installation |
Load unpacked extension |
Install userscript |
| Cross-browser |
Chrome/Edge only |
Chrome, Firefox, Safari, Opera |
| Update mechanism |
Manual reload |
Tampermonkey auto-update |
Troubleshooting
Script Not Working
- Ensure Tampermonkey is installed and enabled
- Chrome/Edge users: Verify Developer Mode is enabled (see Installation Prerequisites)
- Check that the script is enabled in Tampermonkey dashboard
- Verify you're on a https://heymax.ai/cards/your-cards/* page
- Ensure Tampermonkey has permission to run on
heymax.ai:
- Click Tampermonkey icon → Click on the script name → "Enabled" should be checked
- Check browser console for error messages
- Try disabling and re-enabling the script in Tampermonkey dashboard
SubCaps Button Not Appearing
- Ensure you're on a card detail page (not the main cards list)
- Wait for the page to load transaction data
- Check browser console for visibility check logs
- Verify the card is a supported type (UOB PPV or UOB VS)
Patches Being Overwritten
- The script automatically detects and re-applies patches every second
- Check console for re-patching warnings
- This is normal behavior if other scripts modify fetch/XHR
Data Not Persisting
- Tampermonkey storage is isolated per script
- Clearing browser data may not affect Tampermonkey storage
- To reset, open Tampermonkey dashboard → Storage → Delete values
Numbers Don't Match UOB's Records
The script calculates subcaps based on the transaction data visible in HeyMax. There can be slight discrepancies due to:
- Transactions that are pending or not yet synced
- Edge cases in merchant categorization
- Timing differences between HeyMax's data and UOB's systems
Use this as a helpful guide, not as your official record.
Security & Privacy
- The script only runs on https://heymax.ai/cards/your-cards/* pages
- All data is stored locally in Tampermonkey's storage
- No data is transmitted to external servers
- Network logs are only visible in your browser console
- Uses Tampermonkey's secure storage API (GM_getValue/GM_setValue)
- Read-only operation: only intercepts and reads data, doesn't modify anything
Mobile Browser Support
The script works on mobile browsers that support Tampermonkey:
Android
- Edge Mobile: ✅ Fully supported (requires Developer Mode - see Installation Prerequisites)
- Firefox Mobile: ✅ Fully supported
- Kiwi Browser: ✅ Fully supported (Chromium-based browser with extension support)
- Chrome Mobile: ❌ Not supported (doesn't support extensions)
iOS
- Safari: ⚠️ Limited support (iOS 15+ only, via Tampermonkey app)
- Other browsers: ❌ Most iOS browsers don't support userscript managers
Edge Mobile Setup (Android)
Edge Mobile on Android is the recommended mobile browser for this script:
- Install Microsoft Edge from Google Play Store
- Open Edge and tap the three dots (⋯) menu
- Go to Extensions
- Tap "Discover more extensions" or search for Tampermonkey
- Install Tampermonkey
- Enable Developer Mode:
- Tap three dots (⋯) → Extensions → Manage extensions
- Toggle on "Developer mode" at the bottom
- Restart Edge
- Follow the main Installation Steps above to install the userscript
- Navigate to HeyMax and use as normal
Note: Mobile screens are smaller, so the overlay may need scrolling to view all information.
License
This script is part of the HeyMax SubCaps Viewer project. See the main repository LICENSE file for details.