My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

Provides a simple, unofficial, Java client API for accessing your UK HSBC bank account (http://www.hsbc.co.uk).

News

So, finally got round to releasing this after many requests from other developers who found this useful. Hope many more will too. This is still in the very early stages of development and therefore has a fairly primitive engine in identifying accounts. However, I do feel it is stable enough to use. This has been compiled against JDK6u14.

Install

Simply include the jhsbc.jar file in your application's classpath.

Quickstart

This is our "Hello World" example:

import jhsbc.*;

public class Main {

    public static void main(String[] args)
    {
    
        iBotHsbcEngine hsbc = null;
        try 
        {
 //Log into HSBC account using the credential format as specified on the UK HSBC website.
               hsbc = iBotHsbcEngine.login("IB1234567890", "100283", "123456");
        } 
        catch (InvalidCredentialsException ex) 
        {
            System.out.println("[!] Credentials do not meet the expected standard.");
            System.out.println("[*] Format should be: [IB NUMBER] [DOB] [FULL PIN]");
            System.out.println("Example: IB1234567890 100283 123456");
            System.exit(1);
        }

//Successfully logged in, so grab any accounts.	
        Set<Account> accounts = hsbc.getAccounts(); 

//For keeping a tally of the balance total of all accounts.
        BigDecimal total= new BigDecimal(0); 

        for(Account account: accounts)
        {
            String nameOnAccount = account.getNameOnAccount();
            BigInteger accountNumber = account.getAccountNumber();
            BigDecimal balance = account.getBalance();

            System.out.println(account.getAccountName() + "\t" + nameOnAccount + "\t" + accountNumber + "\t" + balance + "\n");
            total = total.add(balance);
        }

        System.out.println("\nTotal: " + total);
    }
}

Well done. You're now an expert in using this API! The wiki will have more complete examples soon.

Features

jHSBC utilises the HtmlUnit Project. So grab the libraries!

Provides seamless access to you bank accounts.

A significant amount of validation is performed during the authentication process to ensure that everything is running smoothly.

There is a slight restriction in that it will currently only function with a 6 digit pin.

Problems / Suggestions?

Please do report an issue if you find any bugs or have any feature requests.

Powered by Google Project Hosting