This SDK can be used as a module or an example of how to connect to any financial institution integrated by Yapily.
To connect to the Yapily API, you will need to register your application at https://dashboard.yapily.com.
These application credentials can then be used to authorise all your API requests.
The SDK is currently available in the Yapily maven repository and can be included in your project by adding it to your dependencies
Repository:
<repositories>
<!-- other repos-->
<repository>
<id>yapily-repo</id>
<name>yapily-repo</name>
<url>http://maven.yapily.com/</url>
</repository>
</repositories>
Dependency:
<dependencies>
<!-- other dependencies -->
<dependency>
<groupId>yapily</groupId>
<artifactId>yapily-sdk-java</artifactId>
<version>0.0.4-SNAPSHOT</version>
</dependency>
</dependencies>
Repository:
repositories {
// other repos
maven {
url "http://maven.yapily.com/"
}
}
Dependency:
compile group: 'yapily', name: 'yapily-sdk-java', version: '0.0.4-SNAPSHOT'
The JAR can also be downloaded from a tagged release, or this project can be cloned/downloaded and packaged into a library JAR to be included in your project.
Sample usage of the SDK can be seen in the examples
folder.
- Retrieve a list of available financial institutions to connect to
InstitutionsApi institutionsApi = new InstitutionsApi.Builder().standard().build();
List<Institution> institutionList = institutionsApi.listInstitutions();
- Creating users and retrieving users for your application registered in the Yapily Dashboard
UsersApi usersApi = new UsersApi.Builder().standard().build();
usersApi.createUser("Bojack");
List<ApplicationUser> users = usersApi.listUsers();
- Receiving an authorisation URL your users to log into their institution
Auth auth = new Auth();
URI directUrl = auth.authDirectURL(applicationId, userUuid, institutionId, YOUR_CALLBACK_URL, "account");
- Receiving consents issued by your user authorizing
List<Consent> allConsents = usersApi.listConsents(YOUR_USER_ID);
- Returning user account details
AccountsApi accountsApi = new AccountsApi.Builder().standard().withConsentToken(YOUR_CONSENT_TOKEN).build();
List<Account> accounts = accountsApi.listAccounts(userUuid, institutionId);
- Returning user transaction details
TransactionsApi transactionsApi = new TransactionsApi.Builder().standard().withConsentToken(YOUR_CONSENT_TOKEN).build();
List<Transaction> transactions = transactionsApi.listTransactions(userUuid, accountId, institutionId);
- Returning user identity details
IdentitiesApi identitiesApi = new IdentitiesApi.Builder().standard().withConsentToken(YOUR_CONSENT_TOKEN).build();
Identity identity = identitiesApi.getIdentity(userUuid, institutionId);
For more information on how to get connected, visit the Yapily developer resources repo.