Java Integration

Add Yapily to your Java projects to collect financial data for your users and/or create payment instructions.

If you haven't already, check out our Getting Started guide.

Installation

Using Maven

Add Yapily's repository in your pom.xml

<repositories>
   <!-- other repos-->
   <repository>
       <id>yapily-repo</id>
       <name>yapily-repo</name>
       <url>http://maven.yapily.com/</url>
   </repository>
</repositories>

Add yapily as a dependency in your pom.xml

<dependencies>
   <!-- other dependencies -->
   <dependency>
       <groupId>yapily</groupId>
       <artifactId>yapily-sdk</artifactId>
       <version>0.0.239</version>
   </dependency>
</dependencies>

Then run mvn install to install the library.

Using Gradle

Add Yapily's repository

repositories {
    // other repos
    maven {
        url "http://maven.yapily.com/"
    }
}

Add yapily-sdk to the dependencies section in your build.gradle:

compile group: 'yapily', name: 'yapily-sdk', version: '0.0.253'

Manual JAR installation

Download the latest release and place it with it's dependencies in your app's classpath.

Basic Configuration

Import the ApiClient and HttpBasicAuth classes in your code and initialise as follows:

ApiClient defaultClient = Configuration.getDefaultApiClient();
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername(API_KEY);
basicAuth.setPassword(API_SECRET);

Or use separate configuration (when using multiple applications):

ApiClient applicationClient = new ApiClient();
HttpBasicAuth basicAuth = (HttpBasicAuth) applicationClient.getAuthentication("basicAuth");
basicAuth.setUsername(API_KEY);
basicAuth.setPassword(API_SECRET);
InstitutionsApi institutionsApi = new InstitutionsApi();
institutionsApi.setApiClient(applicationClient);

API Operations