Quicko API Client
The official repository of SDKs to communicate with Quicko APIs.
Quicko API is a set of REST APIs provides digital infrastructure you will need to quickly build and scale your fintech application in banking, savings, wealth, financial wellness, and insurance.
Quicko Infosoft Pvt Ltd (c) 2020.
Documentation
Installation
Requirements
- Java 1.8 or later
Maven users
Add this dependency to your project's POM:
<dependency>
<groupId>com.quicko</groupId>
<artifactId>api-client</artifactId>
<version>3.4.0-BUILD-RELEASE</version>
</dependency>
Others
You'll need to manually install the following JARs:
- The Quicko API Client JAR from https://github.com/TeamQuicko/quicko-api-client/releases/latest
Usage
API Authentication
Instantiate ApiClient
with api_key
& api_secret
. Use this ApiClient to call Paid APIs or to access resources on server for api user. You can obtain the key from the dashboard. https://dashboard.api.quicko.com/
// Initialize ApiUserCredentials
ApiUserCredentials credentials = new ApiUserCredentials("api_key", "api_secret");
// Initialize ApiClient with API session
ApiClient client =
ApiClientBuilder.basic().withCredentials(credentials).build();
// Use ApiClient to call Paid APIs or to access resources on server for api user
GoodsAndServicesTaxIdentificationNumber gstin = client.GST.GSP.PUBLIC.searchGSTIN(gstin);
OAuth
You can initialize ApiClient
with Resource Owner session using OAuth. Use this ApiClient
to access resources on server on behalf of resource owner.
Steps:
- Navigate to the Quicko OAuth login page with the api_key
- A successful login comes back with a request_token to the registered redirect URL
- Provide the request_token using
OAUTH.authorize
- Obtain the access_token and use that to build a
ApiClient
with resource owner session
// Initialize ApiClient for API User
ApiClient client =
ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build();
// When using Redirection based OAuth workflow, a successful login comes back with a request token
// to the registered redirect URL. Use that request token to obtain resource owner access token.
String accessToken = client.OAUTH.authorize(requestToken);
// Initialize ApiClient with OAuth session
ApiClient resourceOwnerClient =
ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build(accessToken);
// Use ApiClient to call APIs to access resources on server on behalf of resource owner
List<TaxPayer> taxpayers = resourceOwnerClient.IT.TAXPAYER.getTaxPayers(pan);
Steps:
- Generate OTP for user using
OAUTH.generateOTP
- User will obtain an One Time Password (OTP) on their registered email address with validity of 10 mins
- Provide the otp and username (user's email) to verify otp using
OAUTH.authenticate
- Obtain the access_token and use that to build a
ApiClient
with resource owner session
// Initialize ApiClient for API User
ApiClient client =
ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build();
// When using API based OAuth workflow, generate OTP for resource owner.
client.OAUTH.generateOTP(username);
// Verify OTP for resource owner authentication.
String accessToken = client.OAUTH.authenticate(username, otp);
// Initialize ApiClient with OAuth session
ApiClient resourceOwnerClient =
ApiClientBuilder.basic().withCredentials(new ApiUserCredentials("api_key", "api_secret")).build(accessToken);
// Use ApiClient to call APIs to access resources on server on behalf of resource owner
List<TaxPayer> taxpayers = resourceOwnerClient.IT.TAXPAYER.getTaxPayers(pan);