Skip to content

Comments

feat(hsbc-uk): Add credit card support#17

Open
prisonblues wants to merge 3 commits intoshuckster:masterfrom
prisonblues:feat/hsbc-cc-support
Open

feat(hsbc-uk): Add credit card support#17
prisonblues wants to merge 3 commits intoshuckster:masterfrom
prisonblues:feat/hsbc-cc-support

Conversation

@prisonblues
Copy link

Summary

  • Add credit card transaction export support (identifies CC accounts by normalisedProductCategoryCode === 'CC')
  • Add credit card PDF statement download feature with "CC PDFs" button
  • Downloads all CC statement PDFs going back to 2020 (since transaction API only has 18-month rolling window)

Changes

CC Transaction Support

  • Extract CC accounts from accounts API
  • Fetch transactions using identifierType=CARD endpoint
  • Handle both BILLED and UN_BILLED transaction types
  • Parse CC-specific fields (transactionCreditDebitCode)

CC PDF Downloads

  • New "CC PDFs" button (only shown when CC accounts exist)
  • Downloads PDFs individually with 5-second rate limiting to avoid API throttling
  • Handles both raw PDF and base64-encoded responses
  • Saves each PDF immediately as fetched
  • Filename format: CC_Statement_XXXX_YYYY-MM-DD.pdf

Test plan

  • Log into HSBC online banking with a credit card account
  • Load OBIS bookmarklet
  • Verify CC account appears in account list
  • Click "Fetch" and verify CC transactions are retrieved
  • Download all and verify CC transactions appear in CSV/OFX output
  • Click "CC PDFs" and verify PDF statements download

🤖 Generated with Claude Code

prisonblues and others added 3 commits January 12, 2026 01:43
- Detect CC accounts via normalisedProductCategoryCode
- Add fetchCreditCardTransactions with BILLED/UN_BILLED support
- Fix pagination using json.pagination.nextPageIndex
- Combine UN_BILLED and BILLED into single synthetic statement
- Handle CC account display (masked card number)
Add ability to download all credit card PDF statements going back to 2020.
- New "CC PDFs" button appears when CC accounts are detected
- Downloads PDFs individually with 5-second rate limiting
- Handles both raw PDF and base64-encoded responses
- Saves each PDF immediately as fetched (no batching)
- Filename format: CC_Statement_XXXX_YYYY-MM-DD.pdf

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant