DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Curious about the future of data-driven systems? Join our Data Engineering roundtable and learn how to build scalable data platforms.

Data Engineering: The industry has come a long way from organizing unstructured data to adopting today's modern data pipelines. See how.

Threat Detection: Learn core practices for managing security risks and vulnerabilities in your organization — don't regret those threats!

Managing API integrations: Assess your use case and needs — plus learn patterns for the design, build, and maintenance of your integrations.

Related

  • How To Get Cell Data From an Excel Spreadsheet Using APIs in Java
  • Enterprise RIA With Spring 3, Flex 4 and GraniteDS
  • Migrating Spring Java Applications to Azure App Service (Part 1: DataSources and Credentials)
  • How To Build Web Service Using Spring Boot 2.x

Trending

  • Multimodal RAG Is Not Scary, Ghosts Are Scary
  • Organizing Logging Between the Three IBM App Connect Form Factors
  • Integrated Gradients: AI Explainability for Regulated Industries
  • Dapr and Service Meshes: Better Together
  1. DZone
  2. Coding
  3. Java
  4. OFX4J: Java Web Service APIs for Interfacing with Financial Institutions

OFX4J: Java Web Service APIs for Interfacing with Financial Institutions

By 
Ryan Heaton user avatar
Ryan Heaton
·
Jul. 22, 08 · News
Likes (0)
Comment
Save
Tweet
Share
3.4K Views

Join the DZone community and get the full member experience.

Join For Free

OFX4J has been released!

OFX4J is a Java implementation of Open Financial Exchange, which defines web service APIs for interfacing with financial institutions. The OFX4J library includes support for both client-side and server-side implementations of both version 1 and version 2 of the OFX specification.

As an example, let's consider the OFX4J client-side interface, which can be used, for example, to download your financial transactions from your bank or credit card institution. OFX4J comes with an initial set of financial institution data, but you can load your own if your financial institution isn't included.

Consider the following code for downloading your bank statement:

//the financial institution data is loaded or created
//the FinancialInstitutionData interface defines
//what is required to interface with a financial institution.
FinancialInstitutionData data = ...;
FinancialInstitutionService service
= new FinancialInstitutionServiceImpl();
FinancialInstitution fi = service.getFinancialInstitution(data);

//get a reference to a specific bank account at the FI
BankAccountDetails bankAccountDetails
= new BankAccountDetails();

//routing number to the bank.
bankAccountDetails.setRoutingNumber("11111111");
//bank account number.
bankAccountDetails.setAccountNumber("1234-5678");
//it's a checking account
bankAccountDetails.setAccountType(AccountType.CHECKING);

BankAccount bankAccount
= fi.loadBankAccount(bankAccountDetails, "username", "password");

//read the statement (transaction details, etc.)
// for a given time period.
Date startDate = ...;
Date endDate = ...;
AccountStatement statement
= bankAccount.readStatement(startDate, endDate);

// get a reference to a specific credit card
// account at your FI
CreditCardAccountDetails ccDetails
= new CreditCardAccountDetails();
ccDetails.setAccountNumber("1234-567890-1111");
CreditCardAccount ccAccount
= fi.loadCreditCardAccount(ccDetails, "username", "password");

// read the statement (transaction details, etc.)
// for a given time period.
Date startDate = ...;
Date endDate = ...;
AccountStatement statement
= ccAccount.readStatement(startDate, endDate);

Server-side development is just straightforward, consisting of implementing a simple interface and publishing it with a simple Servlet implementation:

/**
* Basic interface for an OFX server.
*
* @author Ryan Heaton
*/
public interface OFXServer {

/**
* Get a response for the given request.
*
* @param request The request.
* @return The response.
*/
ResponseEnvelope getResponse(RequestEnvelope request);
}

 

 

Web Service Java (programming language)

Opinions expressed by DZone contributors are their own.

Related

  • How To Get Cell Data From an Excel Spreadsheet Using APIs in Java
  • Enterprise RIA With Spring 3, Flex 4 and GraniteDS
  • Migrating Spring Java Applications to Azure App Service (Part 1: DataSources and Credentials)
  • How To Build Web Service Using Spring Boot 2.x

Partner Resources


Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: