OST KYC SDK for Java

The official OST KYC SDK for Java(https://dev.ost.com/docs/kyc/index.html).

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.ost
ArtifactId

ArtifactId

ost-kyc-sdk-java
Last Version

Last Version

2.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

OST KYC SDK for Java
The official OST KYC SDK for Java(https://dev.ost.com/docs/kyc/index.html).
Source Code Management

Source Code Management

https://github.com/ostdotcom/ost-kyc-sdk-java

Download ost-kyc-sdk-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.ost/ost-kyc-sdk-java/ -->
<dependency>
    <groupId>com.ost</groupId>
    <artifactId>ost-kyc-sdk-java</artifactId>
    <version>2.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.ost/ost-kyc-sdk-java/
implementation 'com.ost:ost-kyc-sdk-java:2.0.4'
// https://jarcasting.com/artifacts/com.ost/ost-kyc-sdk-java/
implementation ("com.ost:ost-kyc-sdk-java:2.0.4")
'com.ost:ost-kyc-sdk-java:jar:2.0.4'
<dependency org="com.ost" name="ost-kyc-sdk-java" rev="2.0.4">
  <artifact name="ost-kyc-sdk-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ost', module='ost-kyc-sdk-java', version='2.0.4')
)
libraryDependencies += "com.ost" % "ost-kyc-sdk-java" % "2.0.4"
[com.ost/ost-kyc-sdk-java "2.0.4"]

Dependencies

compile (5)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.8.2
com.google.guava : guava jar 18.0
org.apache.commons : commons-lang3 jar 3.7
com.squareup.okhttp3 : okhttp jar 3.10.0
org.slf4j : slf4j-api jar 1.7.7

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

OST KYC JAVA SDK

The official OST KYC JAVA SDK.

Travis

Requirements

To use this node module, developers will need to:

  1. Login on https://kyc.ost.com/admin/login.
  2. Obtain an API Key and API Secret from https://kyc.ost.com/admin/settings/developer-integrations.

Documentation

https://dev.ost.com/docs/kyc/index.html

Installation

Maven users

Add this dependency to your project's POM:

<dependency>
<groupId>com.ost</groupId>
<artifactId>ost-kyc-sdk-java</artifactId>
<version>2.0.4</version>
</dependency>

Building from source using Maven

Clone the repository

git clone https://github.com/ostdotcom/ost-kyc-sdk-java.git
cd ost-kyc-sdk-java

Package using MVN (without dependencies)

mvn clean pacakge -DskipTests

With dependencies

mvn clean compile assembly:single -DskipTests

The jar file can be found in the target folder.

Example Usage

Initialize the SDK object:

// the latest valid API endpoint is "https://kyc.sandboxost.com", this may change in the future
HashMap <String,Object> sdkConfig = new HashMap<String,Object>();
sdkConfig.put("apiEndpoint","[API_ENDPOINT]");
sdkConfig.put("apiKey","[YOUR_API_KEY]");
sdkConfig.put("apiSecret","[YOUR_API_SECRET]");


// The config field is optional for sdkConfig Object
HashMap <String,Object> nestedparam = new HashMap<String,Object>();
// This is the timeout in seconds for which the socket connection will remain open
// The value of timeout will always be of type long
nestedparam.put("timeout", (long) 15);
sdkConfig.put("config", nestedparam);


OSTKYCSDK ostObj = new OSTKYCSDK(sdkConfig);
com.ost.kyc.services.v2.Manifest services = (com.ost.kyc.services.v2.Manifest) ostObj.services;

Users Module

com.ost.kyc.services.v2.User userService = services.user;

Create a new user:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("email", "[email protected]");
JsonObject response = userService.create( params );
System.out.println("response: " + response.toString() );

Get an existing user:

HashMap <String,Object> params = new HashMap<String,Object>();
params.put("id", "11007");
JsonObject response = userService.get( params );
System.out.println("response: " + response.toString() );

Get a list of existing users and other data:

HashMap <String,Object> params = new HashMap<String,Object>();
JsonObject response = userService.list( params );
System.out.println("response: " + response.toString() );

UsersKyc Module

com.ost.kyc.services.v2.UsersKyc usersKycService = services.usersKyc;

Get an existing user kyc:

HashMap <String,Object> params = new HashMap<String,Object>();
params.put("user_id", "11007");
JsonObject response = usersKycService.get( params );
System.out.println("response: " + response.toString() );

Create/Update a new user kyc:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("user_id", "11052");
params.put("first_name", "YOGESH");
params.put("last_name", "SAWANT");
params.put("birthdate", "29/07/1992");
params.put("country", "INDIA");
params.put("document_id_number", "ABCD123");
params.put("document_id_file_path", "2/i/016be96da275031de2787b57c99f1471");
params.put("selfie_file_path", "2/i/9e8d3a5a7a58f0f1be50b7876521aebc");
params.put("ethereum_address", "0x04d39e0b112c20917868ffd5c42372ecc5df577b");
params.put("estimated_participation_amount", "1.2");
params.put("residence_proof_file_path", "2/i/4ed790b2d525f4c7b30fbff5cb7bbbdb");
params.put("city", "pune");
params.put("nationality", "INDIAN");
params.put("state", "maharashtra");
params.put("postal_code", "411028");
JsonObject response = usersKycService.submit_kyc( params );
System.out.println("response: " + response.toString() );

Send Approve Email to User:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("user_id", "11550");
JsonObject response = usersKycService.email_approve( params );
System.out.println("response: " + response.toString() );

Send Deny Email to User:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("user_id", "11550");
JsonObject response = usersKycService.email_deny( params );
System.out.println("response: " + response.toString() );

Send Report Issue Email to User:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("user_id", "11550");
JsonObject response = usersKycService.email_report_issue( params );
System.out.println("response: " + response.toString() );

Get a list of existing users kyc and other data:

HashMap <String,Object> params = new HashMap<String,Object>();
JsonObject response = usersKycService.list( params );
System.out.println("response: " + response.toString() );

Get an existing Presigned URL via POST call:

HashMap <String, Object> params = new HashMap<String, Object>();
HashMap <String, String> nestedparams = new HashMap<String, String>();
nestedparams.put("selfie", "image/jpeg");
params.put("files", nestedparams);
JsonObject response = usersKycService.get_presigned_url_post( params );
System.out.println("response: " + response.toString() );

Get an existing Presigned URL via PUT call:

HashMap <String, Object> params = new HashMap<String, Object>();
HashMap <String, String> nestedparams = new HashMap<String, String>();
nestedparams.put("selfie", "image/jpeg");
params.put("files", nestedparams);
JsonObject response = usersKycService.get_presigned_url_put( params );
System.out.println("response: " + response.toString() );

UsersKycDetail Module

com.ost.kyc.services.v2.UsersKycDetail usersKycDetailService = services.usersKycDetail;

Get an user kyc detail:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("user_id", "11052");
JsonObject response = usersKycDetailService.get( params );
System.out.println("response: " + response.toString() );

Validators Module

com.ost.kyc.services.v2.Validators validatorService = services.validators;

Verify Ethereum Address:

HashMap <String, Object> params = new HashMap<String, Object>();
params.put("ethereum_address", "0x7f2ED21D1702057C7d9f163cB7e5458FA2B6B7c4");
JsonObject response = validatorService.verify_ethereum_address( params );
System.out.println("response: " + response.toString() );
com.ost

OST.com

OST technology enables developers to seamlessly embed Ethereum wallets into mainstream applications to benefit from zero-fee micro-transactions

Versions

Version
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
2.0.0.beta.2
2.0.0.beta.1