Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
12 views50 pages

Stateless API Digi

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 50

Getting started with Digio Stateless Cloud SaaS API

Getting started with Digio Stateless Cloud SaaS API 1


Digio Environments: Sandbox & Production 1

Indian Individuals (ID Cards | OCR and Verification) 2

Indian Individuals (ID Cards | Verification) 10

Aadhaar Masking API 15


Approach 1 : Upload the file 15
Approach 2 : Upload encoded base64 15

Business Entity’s Verification 17

KRA Registry APIs 23


Check Pan Status 23

CKYC Registry APIs 26


Prerequisites 26
Check CKYC Status 27
Download CKYC data 28

Face Match API 31

OCR API (Other than ID Cards) 32

UPI VPA Verification 33

Bank Account Verification (Penny Drop) 34

Fuzzy Match 40

Android SDK with and without Machine Learning (Native app) 42

IOS SDK (Native app) 52

Digio Environments: Sandbox & Production


Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


1
Environment BASE URL API Credentials

Sandbox https://ext.digio.in:444 Use Sandbox client id/client secret

Production https://api.digio.in Use Production client id/client secret

Below List of URLs and IP addresses need to be whitelisted, if required by


a business in the Firewall

URLs (For outgoing traffic):

Sandbox : https://ext.digio.in:444
Production : https://api.digio.in

Indian Individuals (ID Cards | OCR and Verification)


Digio Indian ID card Analysis and Verification APIs can be used for extracting data and user
image from below types of ID cards and verifying with the central database.

1. PAN
2. VOTER_ID
3. AADHAAR
4. PASSPORT
5. DRIVING LICENSE
6. Registration Certificate (RC of vehicle registration)
7. Cheque OCR

POST {BASE_URL}/v3/client/kyc/analyze/file/idcard

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “multipart/form-data”

Param Name Param Type Is Mandatory Description

front_part File Yes Front Part of ID Card


Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


2
back_part File No Back Part of ID card

unique_request_id String No Unique request id for logging purpose

should_verify Boolean No Send true if analysed OCR output to be


verified against central DB

Aaaaaa Denotes : Central Database Match Result

Success Response : PAN

{
"id_type": "PAN",

"name": "AMIT SONTHALIA",

"fathers_name": "Father’s Name as per PAN COPY",

"id_no": "XXXXXXXXXX821M",

"dob": "dd/mm/yyyy",

"encoded_signature": "base64 of cropped signature",

"encoded_image": "base64 of photograph on PAN Card",

"pan_verification_response": {

"is_pan_dob_valid": true,

"name_matched": true

},
"id_card_verification_response": {

"verified": true

Success Response : Aadhaar

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


3
{

"name": "Amit SanthalaS",

"id_no": "xxxxxxxx4042", [Complete Aadhaar no, please mask it before storing in


Database]

"dob": "12/01/1960",

"address": "\n\nWIO: Shiv Charan Gupta,\n6/MB/334, Indira Gandhi Nagar,\


nJagatpura, Dantli, Jaipur,\nRajasthan - 303012",

"gender": "Female",

"id_type": "AADHAAR",

"encoded_image": "base64 of photograph on Aadhaar Card",

"address_information": {

"address": "WIO: Shiv Charan Gupta, 6/MB/334, Indira Gandhi Nagar, Jagatpura,
Dantli, Jaipur, Rajasthan - 303012",

"locality_or_post_office": "Dantli",

"district_or_city": "Jaipur",

"state": "Rajasthan",

"pincode": "303012"

Success Response : Voter ID

"name": "Amit Sonthalia",


"mothers_name": " : Sarita Sonthalia",

"id_no": "xxxxxx8047",

"address": "Complete Address as per ID Card uploaded",

"id_type": "VOTER_ID",

"date_of_issue": "13/02/2009",

"encoded_image": "base64 of photograph on VOTER ID",

"address_information": {

"address": Complete Address as per ID Card uploaded",

"locality_or_post_office": "",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


4
"district_or_city": ""

},

"id_card_verification_response": {

"verified": true,

"result": {

"id_no": true,

"name": true

},

"id_data": {

"pc_name": "NORTH WEST DELHI ",

"st_code": "U05",

"ps_lat_long_1_coordinate": 0,

"gender": "M",

"rln_name_v2": "",

"rln_name_v1": "सतीश कु मार ",

"rln_name_v3": "",

"name_v1": "अरश ध्रुव बघेल ",

"ac_name": "ROHINI",

"name_v2": "",

"name_v3": "",

"ps_lat_long": "0.0,0.0",

"pc_no": "5",

"last_update": "Tue Feb 11 20:36:31 IST 2020",

"id": "U050130022050825",

"dist_no": "8",

"ps_no": "22",

"ps_name": "NORTH DMC PRY. SCHOOL NO-2 SEC 18 ROHINI (NEAR DR. LAL PATH
LAB)",

"ps_name_v1": "नॉर्थ डी एम सी प्राइमरी स्कू ल\t नं -2 सेक्टर-18 रोहिणी (निकट डॉक्टर लाल पाथ लैब।) दिल्ली",

"st_name": "NCT OF Delhi",

"dist_name": "NORTH ",

"rln_type": "F",

"pc_name_v1": "उत्तर पश्चिमी दिल्ली",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


5
"part_name_v1": "रोहणी सैक्टर 18",

"ac_name_v1": "रोहिणी",

"part_no": "22",

"dist_name_v1": "उत्तर",

"ps_lat_long_0_coordinate": 0,

"_version_": 1658268958771380226,

"name": "ARSH DHRUV BAGHEL ",

"section_no": "5",

"ac_no": "13",

"slno_inpart": "825",

"rln_name": "SATISH KUMAR ",

"age": 24,

"part_name": "SECTOR-18 ROHINI",

"id_no": "AFQ2053295 "

Success Response : Passport

"name": "INDIAN",

"fathers_name": "",

"mothers_name": "",

"id_no": "",

"dob": "",

"address": "",

"gender": "",

"id_type": "PASSPORT",

"file_no": "",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


6
"type": "",

"country_code": "",

"sur_name": "",

"nationality": "",

"place_of_birth": "",

"place_of_issue": "",

"encoded_image": "base 64 of photograph on Passport",

"address_information": {

"locality_or_post_office": "SAGAR NAGAR",

"district_or_city": "VISAKHAPATNAM URBAN",

"state": "ANDHRA PRADESH",

"pincode": "530045"

Success Response : Driving License

"name": ": AKASH KUMAR",

"id_no": "BR-0320140060327",

"dob": "02-01-1994",

"id_type": "DRIVING_LICENSE",

"encoded_image": "",

"id_card_verification_response": {

"verified": true,

"result": {},

"id_data": {

"Date Of Issue": "20-Jun-2014",

"NT": "MCWG",

"Old / New DL No.": "NA",

"Holder's Name": "AKASH KUMAR",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


7
"Hazardous Valid Till": "NA",

"Non-Transport": "From: 20-Jun-2014",

"Transport": "From: NA",

"Current Status": "ACTIVE",

"Last Transaction At": "DTO, BHOJPUR"

Success Response : Registration Certificate

"id_no": "KA06ES4811",

"id_type": "VEHICLE_RC",

"engine_no": " U5S5FOEK079936",

"chassis_no": " ME3U5S5FOEK079936",

"id_card_verification_response": {

"verified": true,

"result": {

"id_no": true

},

"id_data": {

"Fuel Norms": "NOT AVAILABLE",

"id_no": "KA06ES4811",

"Maker / Model": "ROYAL-ENFIELD (UNIT OF EICHER LTD) / ENFIELD CLASSIC


500",

"Chassis No": "ME3U5S5F0EK0XXXXX",

"Fitness Upto": "22-Dec-2029",

"Owner Name": "ARVIND SENCHA",

"Vehicle Class": "M-CYCLE/SCOOTER (2WN)"

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


8
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


9
Indian Individuals (ID Cards | Verification)
Digio Indian ID card Verification APIs can be used for below types of ID cards and verifying
them with the central database.

POST {BASE_URL}/v3/client/kyc/fetch_id_data/{id_card_type}

Sample URL - https://ext.digio.in:444/v3/client/kyc/fetch_id_data/VOTER_ID


Please pass id type from the list mentioned below in {id_card_type}

1. PAN
2. VOTER_ID
3. DRIVING_LICENSE
4. VEHICLE_RC [Verification NA for now]

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request:
Param Name Param Type Is Mandatory Description

id_no String Yes

dob String Yes Date of Birth, Mandatory for DL


and not for VoterId and RC
dd/mm/yyyy format

Response: Map of Id card properties to value from central database'

PAN Request:
{
"id_no": "{}"
}

Response:
{
"pan": "{}",
"status": "VALID",
"full_name": "MADHAV SINGH",
"category": "Individual"

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


10
}

VOTER_ID Request:
{
"id_no" :"AFQ2053295"
}

Response:
{
"pc_name": "NORTH WEST DELHI ",
"st_code": "U05",
"ps_lat_long_1_coordinate": 0,
"gender": "M",
"rln_name_v2": "",
"rln_name_v1": "सतीश कु मार ",
"rln_name_v3": "",
"name_v1": "अरश ध्रुव बघेल ",
"epic_no": "AFQ2053295 ",
"ac_name": "ROHINI",
"name_v2": "",
"name_v3": "",
"ps_lat_long": "0.0,0.0",
"pc_no": "5",
"last_update": "Tue Feb 11 20:36:31 IST 2020",
"id": "U050130022050825",
"dist_no": "8",
"ps_no": "22",
"ps_name": "NORTH DMC PRY. SCHOOL NO-2 SEC 18 ROHINI (NEAR DR. LAL PATH
LAB)",
"ps_name_v1": "नॉर्थ डी एम सी प्राइमरी स्कू ल\t नं -2 सेक्टर-18 रोहिणी (निकट डॉक्टर लाल पाथ लैब।) दिल्ली",
"st_name": "NCT OF Delhi",
"dist_name": "NORTH ",
"rln_type": "F",
"pc_name_v1": "उत्तर पश्चिमी दिल्ली",
"part_name_v1": "रोहणी सैक्टर 18",
"ac_name_v1": "रोहिणी",
"part_no": "22",
"dist_name_v1": "उत्तर",
"ps_lat_long_0_coordinate": 0,

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


11
"_version_": 1658268958771380226,
"name": "ARSH DHRUV BAGHEL ",
"section_no": "5",
"ac_no": "13",
"slno_inpart": "825",
"rln_name": "SATISH KUMAR ",
"age": 24,
"part_name": "SECTOR-18 ROHINI"
}

DRIVING LICENSE Request:


{
"id_no" :"DL Number",
"dob" :"30/12/1996"
}

Response:
{
"Date Of Issue": "11-Dec-2015",
"NT": "LMV",
"Old / New DL No.": "NA",
"Holder's Name": "Holder Name",
"Hazardous Valid Till": "NA",
"Non-Transport": "From: 11-Dec-2015",
"Transport": "From: NA",
"Current Status": "ACTIVE",
"Last Transaction At": "RTO, SALEM SOUTH"
}

VEHICLE_RC Request:
{
"id_no" :"Vehicle registration number without space"
}

Response:
{
"Fuel Norms": "NOT AVAILABLE",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


12
"Registration No": "",
"Maker / Model": "ROYAL-ENFIELD",
"Chassis No": "ME3U5S5F0EK0XXXXX",
"Fitness Upto": "22-Dec-2029",
"Owner Name": "",
"Vehicle Class": "M-CYCLE/SCOOTER (2WN)"
}

5. PAN Verification API

POST {BASE_URL}/v3/client/kyc/pan/verify

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request:

Param Name Param Type Is Mandatory Description

pan_no String Yes

date_of_birth String Yes Date of Birth, Mandatory


yyyy-mm-dd format. Required as
part of request but dob is not
validated.

full_name String Yes

Request:
{
"pan_no" : "ABCDE1234A",
"full_name" : "Dinesh Rathore",
"date_of_birth" : "1990-07-05"
}

Response:
{
"is_pan_dob_valid": true,

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


13
"name_matched": true
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


14
Aadhaar Masking API
Approach 1 : Upload the file

POST v3/client/kyc/aadhaar/file/mask

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “multipart/form-data”

Request Body

Param Name Param Type Is Mandatory Description

file File yes Aadhaar image file in JPEG/JPG/PNG or PDF


format

consent String yes “yes/no”. Positive consent is mandatory to


perform this action.

file_name String no Response file name if it has to be a specific one.


Output given will always be in “.png”

unique_request_id String no Any unique request id for audit purpose

Approach 2 : Upload encoded base64

POST v3/client/kyc/aadhaar/mask

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Param Name Param Type Is Mandatory Description

data String yes Base64 encoded Aadhaar image file in JPEG/JPG or


PNG format. If you want to use PDF pass another
attribute “data_content_type”:”PDF”

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


15
consent String yes yes/no

file_name String no Response file name if it has to be a specific one.


Always given with .png

unique_request_id String No Unique request id for logging purpose

Response:

Masked Aadhaar image stream of image/png type

If response is required in json format (Base64 encoded image) pass ?resp_json=true as query param. Image is
returned as a “data” attribute inside json.

Please Note: Try to keep the file size as small as possible for faster results and not more than 1 MB as a good
practice.

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


16
Business Entity’s Verification
Business 360 Degree verification. APIs can be used for extracting data from central databases
and matching it against data in your repository:

1. FSSAI License
2. Udyog AADHAAR
3. Company information
4. Director Information
5. GST Number
6. PAN

POST {BASE_URL}/v3/client/kyc/fetch_id_data/{type}

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request:

Param Name Param Type Is Mandatory Description

id_no String Yes Check below table for more


details

Business Id Type Type Enum Mandatory Param (what to pass in id_no)

FSSAI License FSSAI FSSAI License Number

Udyog AADHAAR UAADHAAR Udyog Aadhar Registration Number

Company information CIN CIN number of a company, Other Option is to pass


name of company in param “name”

Director Information DIN DIN Number of person

GSTIN GST GSTIN number

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


17
1. Success Response : FSSAI

{
"Status": "Active",
"Company Name": "RUCHI SOYA INDUSTRIES LIMITED",
"Products": "02 - FATS AND OILS, AND FAT EMULSION, 03 - EDIBLE ICES, INCLUDING SHERBET
AND SORBE, 04 - FRUITS AND VEGETABLES (INCLUDING MUSHROOMS AND FUNGI, ROOTS AND
TUBERS, PULSES AND LEGUMES, AND ALOE VERA), SEAWEEDS, AND NUTS AND SEEDS, 05 –
CONFECTIONERY, 06 - CEREALS AND CEREAL PRODUCTS, DERIVED FROM CEREAL GRAINS, FROM
ROOTS AND TUBERS, PULSES, LEGUMES AND PITH OR SOFT CORE OF PALM TREE, EXCLUDING
BAKERY WARES OF FOOD CATEGORY 7.0, 07 - BAKERY PRODUCTS, 11 - SWEETENERS, INCLUDING
HONEY, 12 - SALTS, SPICES, SOUPS, SAUCES, SALADS AND PROTEIN PRODUCTS, 14 - BEVERAGES,
EXCLUDING DAIRY PRODUCTS, 15 - READY-TO-EAT SAVOURIES",
"Kind of Business": "Storage (Cold / Refrigerated), Storage (Except Controlled Atmosphere and
Cold), Wholesaler",
"Expiry Date": "08/07/2021",
"Premises Address": "Ruchi Soya Industries Limited C/O M/S Surender Logistics Survey No. 78/2/1,
building no.B-6, Gala no.9,10,11, At post Gundavali, Tal. Bhiwandi, Dist Thane: 412302, District -
Thane, STATE - Maharashtra",
"License / Registration No.": "10012022000259"
}

2. Success Response : UAADHAR

{
"Code of Enterprise": "B",
"UAN": "_____",
"Name of Enterprise": "_____",
"Major Activity": "Manufacturing",
"Social Category": "General",
"Location of Plant Details": [
{
"Flat/Door/Block No.": "_____",
"Name of Premises/Building Village": "_____",
"Road/Street/ Lane": "_____",
"Area/Locality": "_____",
"City": "BENGALURU",
"Pin": "562130",
"State": "KARNATAKA",
"District": "BENGALURU (URBAN)"
}
],
"Enterprise Type": "Small",
"National Industry Classification Code": [
{
"NIC 2 Digit": "27-Manufacture of electrical equipment",
"NIC 4 Digit": "2750-Manufacture of domestic appliances",
"NIC 5 Digit Code": "27509-Manufacture of other domestic appliances n.e.c.",
"Activity Type": "Manufacturing",
"Added On": "06/09/2017"
},

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


18
{
"NIC 2 Digit": "27-Manufacture of electrical equipment",
"NIC 4 Digit": "2750-Manufacture of domestic appliances",
"NIC 5 Digit Code": "27504-Manufacture of domestic non-electric cooking and heating
equipment such as non-electric space heaters, cooking ranges, grates, stoves, water heaters, cooking
appliances, plate warmers",
"Activity Type": "Manufacturing",
"Added On": "06/09/2017"
}
],
"Date of commencement": "01/10/2012",
"DIC Name": "BANGALORE (URBAN)",
"State": "KARNATAKA",
"Applied Date": "06/09/2017",
"Modified Date": "18/09/2018",
"Valid Till": "31/03/2021"
}

3. Success Response : CIN

{
"CIN ": "_____",
"Company Name": "_____",
"ROC Code": "RoC-Bangalore",
"Registration Number": "_____",
"Company Category": "Company limited by Shares",
"Company SubCategory": "Non-govt company",
"Class of Company": "Private",
"Authorised Capital(Rs)": "_____",
"Paid up Capital(Rs)": "_____",
"Number of Members(Applicable in case of company without Share Capital)": "0",
"Date of Incorporation": "12/04/2016",
"Registered Address": "_____",
"Address other than R/o where all or any books of account and papers are maintained": "-",
"Email Id": "_____",
"Whether Listed or not": "Unlisted",
"ACTIVE compliance": "ACTIVE compliant",
"Suspended at stock exchange": "-",
"Date of last AGM": "30/09/2019",
"Date of Balance Sheet": "31/03/2019",
"Company Status(for efiling)": "Active",
"directors": [
{
"End date": "-",
"Begin date": "12/04/2016",
"DIN/PAN": "_____",
"Surrendered DIN": "",
"Name": "_____"
},
{
"End date": "-",
"Begin date": "12/04/2016",
"DIN/PAN": "_____",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


19
"Surrendered DIN": "",
"Name": "A_____"
}
]
}

4. Success Response : DIN

{
"DIN": "_____",
"Name": "SANKET NAYAK",
"companies": [
{
"CIN/FCRN": "_____",
"Company Name": "_____",
"Begin Date": "12/04/2016",
"End Date": "-",
"ACTIVE compliance": "ACTIVE compliant"
}
],
"llps": []
}

5. Success Response : GST

{
"gstin": "123456789123456",
"corporate_name": "Dummy Corporate Private Limited",
"details": {
"stj_cd": "KA012",
"dty": "Regular",
"lgnm": "Dummy Corporate Private Limited",
"adadr": [

],
"cxdt": "",
"gstin": "123456789123456",
"nba": [
"Supplier of Services"
],
"lstupdt": "15\/02\/2019",
"ctb": "Private Limited Company",
"rgdt": "27\/10\/2017",
"pradr": {
"addr": {
"bnm": "",
"loc": "Koramangala",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


20
"st": "15th Cross Rd.",
"bno": "No. 45",
"dst": "Bengaluru (Bangalore) Urban",
"stcd": "Karnataka",
"city": "",
"flno": "",
"lt": "",
"pncd": "560001",
"lg": ""
},
"ntr": "Supplier of Services"
},
"ctj_cd": "YT0110",
"trade_nam": "",
"sts": "Active",
"ctj": "RANGE-ASD9"
}
}

Failure Response :
{
"gstin": "123456789123456",
"error_message": "Invalid GSTIN \/ UID"
}

7. Corporate Pan

Response:
{
"pan": "{}",
"status": "VALID",
"full_name": "{}",
"category": "{}"
}

PAN Verification API

POST {BASE_URL}/v3/client/kyc/pan/verify

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


21
Request:

Param Name Param Type Is Mandatory Description

pan_no String Yes

date_of_birth String Yes Date of Incorporation, Mandatory


dd/mm/yyyy format

full_name String Yes

Response:

{
"is_pan_dob_valid": true,
"name_matched": true
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


22
KRA Registry APIs
These apis can be used to check status, fetch details from KRA and submit details to KRA.
Note: These services are available by getting your KRA credentials configured in Digio
Systems. Currently we support NDML and CVL KRA Agencies.

Check Pan Status


POST {BASE_URL}/v3/client/kyc/kra/get_pan_details
Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request:
Param Name Param Type Is Mandatory Description

pan_no String Yes

dob String Yes In DD/MM/YYYY format.

unique_request_id String No Unique request id for logging


purpose

List of status in Response

Not Checked with respective KRA


Submitted
KRA Verified
Hold
Rejected
Not available
Deactivated
Existing KYC Submitted
Existing KYC Verified
Existing KYC hold
Existing KYC Rejected
KYC REGISTERED WITH CVLMF
Not Checked with Multiple KRA
Invalid PAN NO Format

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


23
Sample Request:

{
"pan_no": "PAN Number",
"dob": "05/07/1990"
}

Sample Response:

{
"result": "FOUND",
"pan_number": "PAN Number",
"name": "Name",
"status": "KRA Verified",
"status_date": "29-04-2017 16:16:45",
"entry_date": "12-04-2017 12:30:16",
"modification_date": "",
"kyc_mode": "Normal KYC",
"deactivate_remarks": "",
"update_remarks": "",
"ipv_flag": "Y",
"pan_details": {
"pan_number": "PAN",
"dob": "05/07/1990",
"gender": "M",
"name": "name",
"father_name": "fathers name",
"correspondence_address1": "",
"correspondence_address2": "",
"correspondence_address3": "JAITARAN",
"correspondence_city": "PALI",
"correspondence_pincode": "306302",
"correspondence_state": "Rajasthan",
"correspondence_country": "India",
"correspondence_address_proof": "Id Type",
"correspondence_address_proof_ref": "Id Number",
"correspondence_address_proof_date": "",
"mobile_number": "",
"email_address": "",
"permanent_address1": "",
"permanent_address2": "",
"permanent_address3": "JAITARAN",
"permanent_city": "PALI",
"permanent_pincode": "306302",
"permanent_state": "Rajasthan",
"permanent_country": "India",
"permanent_address_proof": "Id type",
"permanent_address_proof_ref": "Id Number",
"permanent_address_proof_date": "",
"income": "> 25 LAC",
"occupation": "PRIVATE SECTOR SERVICE",
"political_connection": "NA",
"resident_status": "R",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


24
"nationality": "Indian",
"ipv_date": "29/03/2017"
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


25
CKYC Registry APIs
These APIs can be used to check status, fetch details from CKYC registry.

Prerequisites
Corporate to configure Digio Public key and IP addresses to whitelist in their CKYC Admin Portal. Involve Digio POC
to get Keys to be configured.

IP Addresses to configure in CKYC Portal:

● 35.154.20.28
● 52.66.66.81
● 52.66.66.156
● 13.126.101.165

Screen where this configuration is to be done:

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


26
Check CKYC Status
POST {BASE_URL}/v3/client/kyc/ckyc/search
Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request:
Param Name Param Type Is Mandatory Description

id_no String Yes Pass PAN Number

fi_code String Yes If not passed it must be pre configured in your Digio
Account. If you have multiple FI Cod registrations pass this
in accordance to usecase

unique_request_id String Yes Unique request id for logging purpose

Sample Request:

{
"id_no": "PAN Number",
}

Sample Response: Success

{
"success": true,
"search_response": {
"ckyc_number": "{CKYC Number Here}",
"name": "MR DINESH RATHORE ",
"fathers_name": "Mr TEJA RAM RATHORE",
"age": "30",
"image_type": "jpg",
"photo": "{Base64 Value of Image}",
"kyc_date": "08-04-2017",
"updated_date": "08-04-2017",
"remarks": ""
}
}

Sample Response: Error

{
"success": false,
"error_message": "{Error Message}"
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


27
Download CKYC data
POST {BASE_URL}/v3/client/kyc/ckyc/download
Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request:
Param Name Param Type Is Mandatory Description

ckyc_no String Yes Pass Ckyc Number

date_of_birth String Yes DOB in dd-MM-yyyy format

fi_code String No If not passed it must be pre configured in your Digio


Account. If you have multiple FI Cod registrations pass this
in accordance to usecase

unique_request_id String No Unique request id for logging purpose

Sample Request:

{
"ckyc_no":"{}",
"date_of_birth":"{}"
}

Sample Response: Success

{
"success": true,
"download_response": {
"personal_details": {
"ckyc_number": "",
"type": "INDIVIDUAL/CORP/HUF etc",
"kyc_type": "normal/ekyc/minor",
"prefix": "MR",
"first_name": "DINESH",
"middle_name": "",
"last_name": "RATHORE",
"full_name": "MR DINESH RATHORE",
"maiden_prefix": "",
"maiden_first_name": "",
"maiden_middle_name": "",
"maiden_last_name": "",
"maiden_full_name": "",
"father_spouse_flag": "father/spouse",
"father_prefix": "Mr",
"father_first_name": "TEJA",
"father_middle_name": "",

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


28
"father_last_name": "RAM RATHORE",
"father_full_name": "Mr TEJA RAM RATHORE",
"mother_prefix": "Mrs",
"mother_first_name": "",
"mother_middle_name": "",
"mother_last_name": "",
"mother_full_name": "",
"gender": "M",
"dob": "{}",
"pan": "{}",
"perm_address_line1": "BERA NAVODA",
"perm_address_line2": "BER KALAN",
"perm_address_line3": "JAITARAN",
"perm_address_city": "JAITARAN",
"perm_address_dist": "Pali",
"perm_address_state": "RJ",
"perm_address_country": "IN",
"perm_address_pincode": "306302",
"perm_current_same": "Y/N",
"corr_address_line1": "BERA NAVODA",
"corr_address_line2": "BER KALAN",
"corr_address_line3": "JAITARAN",
"corr_address_city": "JAITARAN",
"corr_address_dist": "Pali",
"corr_address_state": "RJ",
"corr_address_country": "IN",
"corr_address_pincode": "306302",
"mobile_no": "{}",
"email": "{}@GMAIL.COM",
"date": "02-04-2017",
"place": "Bangalore"
},
"id_details": [
{
"type": "PAN",
"id_no": "{}",
"ver_status": true
}
],
"images": [
{
"image_type": "PHOTO",
"type": "jpg/pdf",
"data": "{BASE64}"
},
{
"image_type": "PAN",
"type": "jpg/pdf",
"data": "{BASE64}"
},
{
"image_type": "AADHAAR/PASSPORT/VOTER/DL",
"type": "jpg/pdf",
"data": "{BASE64}"
},

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


29
{
"image_type": "SIGNATURE",
"type": "jpg/pdf",
"data": "{BASE64}"
}
]
}

Sample Response: Error

{
"success": false,
"error_message": "{Error Message}"
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


30
Face Match API
Face Matching APIs can be used matching two images either between id cards or between a
selfie (photograph) or image extracted from the frames of a video.

POST {BASE_URL}/v3/client/kyc/facematch

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “ Multipart/Form-data”

Param Name Param Type Is Mandatory Description

file1 File Yes File type has to be image (supported


types are .jpg, .png,

file2 File Yes File type has to be image (supported


types are .jpg, .png,

minimum_match Integer No If you don't pass the param, then by


default system will take 75 % as
minimum match

unique_request_id String no Any unique request id for audit


purpose

Response

{
"match_result": "matched",
"confidence": "90%",
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


31
OCR API (Other than ID Cards)
This is a plain api which gives a string of readable text on any image.

POST {BASE_URL}/v3/client/kyc/image/perform_ocr

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “Application/json”

Param Name Param Type Is Mandatory Description

front_part String Yes Base64 Encoded Image

unique_request_id String No Unique request id for logging


purpose

Response

String containing OCR data

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


32
UPI VPA Verification
This APi can be used to find customer names against VPA and verify status of same.

POST {BASE_URL}/v3/client/public/upi/check_vpa

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Request

{
"virtual_address" : "abc@ybl"
}

Response

{
"virtual_address" : "abc@ybl"
"customer_name" : "Customer Name",
"status" : "AVAILABLE/NOT_AVAILABLE/FAILED",
"status_description" : "description"
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


33
Bank Account Verification (Penny Drop)
Bank Account Verification APIs can be used to verify the bank account number provided by an
individual or a business. It runs on IMPS platform powered by National Payment Corporation
of India (NPCI)

POST {BASE_URL}/client/verify/bank_account

Headers:
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Use Case : Default, Re 1. Credit to customers bank account

Request

{
"beneficiary_account_no" : "123110023204445",
"beneficiary_ifsc": "UTIB0000888"
}

Use Case : Custom, Re 1 + any amount of corporate choice (max upto Rs. 2), credit to
customers bank account

Request

{
"beneficiary_account_no" : "123110023204445",
"beneficiary_ifsc": "UTIB0000888",
"amount": "1.20",
}

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


34
Response Success

{
"id": "FTI1901091725336218AA5CB1LMWHM1E",
"verified": true,
"verified_at": "2019-01-09 17:25:39",
"beneficiary_name_with_bank": "DUMMY CUSTOMER NAME"
}

Please note : In a sandbox environment you will get “DUMMY CUSTOMER NAME” always as a hardcoded value.
In production you will get the actual name of the beneficiary associated with the account uptol 20 characters.

Response Failure

{
"id": "R9SGBH61RO3L15Q",
"verified": false,
"error_msg": "Invalid beneficiary account details"
}

Response Failure

{
"id": "FTI1809111232556634TGAOUXJM5LLUY",
"verified": false,
"error_code": "es405",
"error_message": "Some error message"
}

List of error codes & messages


Note: Please consider the highlighted error codes and error messages for key reasons
Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


35
statusCode subStatusCo Meaning When Does it Recommended Error
de (error message) Come? Action type
(error code)

FAILED ns:E402 Insufficient Balance in When account to Fund the debit


debit account, be debited account and retry,
payment required doesn't have contact DIGIO :
sufficient funds support@digio.in

FAILED ns:E405 Invalid Transfer Type The Transaction Retry the transaction Business
Type is not from with a valid
the list specified transferType or with
ANY

FAILED ns:E429 (Limit Number of Retry next day Business


Daily/transaction/rate) requests that
exceeded have come from
you have
exceeded the
permissible limit
set by an
upstream system

FAILED ns:E406 Beneficiary not Problem with check with Business


acceptable beneficiary beneficiary bank
account

IN_PROCESS Transaction Check status after 30 Technical


timed out during minutes and retry if
execution FAILED

FAILED ns:E504 Gateway Timeout An upstream Check status after 30 Technical


Error service returned minutes and retry if
an unexpected FAILED
error

FAILED ns:E502 Bad Gateway An upstream Contact Support Technical


service returned
an unexpected
error

FAILED ns:E1001 The transaction Transaction Check Internally Business


amount exceeds the Amount exceeds
maximum amount for IMPS Maximum
IMPS Limit

FAILED ns:E1002 The transfer currency Transfer Pass 'INR' in transfer Business
is not supported. Currency is other currency and
Supported currency is than 'INR'
INR

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


36
FAILED ns:E1003 The transaction Transfer Amount Retry after correcting Business
amount should be is in fraction. the transfer amount
multiples of Re 1 for
RTGS

FAILED ns:E1004 Transfer Amount is Transaction Check transfer type Business


less than the minimum Amount is less and amount and retry
amount for RTGS than RTGS
Minimum
amount

FAILED ns:E6000 Purpose Code not Purpose Code Check Internally Business
found passed in the
request does not
exist in system

FAILED ns:E6001 Only registered Check Check Internally Business


beneficiaries are beneficiary code
allowed for this if registered and
purpose code retry

FAILED ns:E6002 Purpose Code is Pass purpose Check Internally Business


required for this code
customer

FAILED ns:E8000 A transaction with the UniqueRequestN Retry with a new Technical
same reference o has already UNR
number is already come before for
processed or under a successful
processing transaction

FAILED ns:E6003 Invalid Debit Account When debit Contact Support Business
for Customer account no does
not exist in the
customer set up

FAILED flex:E18 Hold Funds Present - Account is in hold Business


Refer to Drawer status. Contact
( Account would Support.
Overdraw )

FAILED flex:E404 No Relationship Exists Contact Support Technical


with the debit Account
{AccountNo} and
partner

FAILED flex:E8036 NEFT - Both Customer Issue with Remitter Technical


Mobile and Email is Account setup.
not valid. Contact support

FAILED flex:E8087 To Account Number is Retry with correct Business


Invalid Beneficiary/customer

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


37
Account

FAILED flex:E9072 Invalid IFSC Code Retry with correct Business


beneficiary IFSC
Code

FAILED npci:E08 Acquiring Bank CBS or Beneficiary bank Technical


node offline node offline. Retry
later

SENT_TO_BE IMPS: IMPS: Check status


NEFICIARY Transaction after 1 hour.
accepted by Transaction status
NPCI but no expected to clear to
response COMPLETED/FAILE
received from D after 2 working
beneficiary bank days in most cases.
within the time NEFT: Check status
limit set NEFT: after 3 hours in NEFT
Transaction has working window.
been accepted
by RBI but the
acknowledgeme
nt has not yet
been received

FAILED npci:EM1 Invalid Beneficiary Retry with correct Business


MMID/Mobile Number MMID/Mobile
Number

FAILED npci:EM2 Amount limit exceeded Transaction Retry with Transfer Business
Amount exceeds Type NEFT or ANY
IMPS Maximum
Limit

FAILED npci:EM3 Account Contact Support. Business


blocked/frozen

FAILED npci:EM4 Beneficiary Bank is not Beneficiary account Business


enabled for Foreign is an NRE Account.
Inward Remittance Domestic
Transactions not
permitted. This will
not come for Inward
Remittance Via
RDA/MTSS

FAILED npci:EM5 Account closed Beneficiary account Business


is closed.

FAILED atom:E404 No Relationship Exists Contact Support Technical


with the debit Account

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


38
{AccountNo} and
partner

SCHEDULED This will come Check status on next


_FOR_NEXT_ for NEFT when working day
WORKDAY the transaction
has been
received post cut
off time or on a
holiday

RETURNED_ sfms:E62 Transaction Give back money Business


FROM_BENE accepted by RBI
FICIARY but beneficiary
bank rejected it.

FAILED sfms:E99 Manually Marked in Transaction is in Give back money Business


Error error due to
issue with the
transaction
details.

FAILED sfms:E70 Outward Transaction Give back money Business


Rejected

FAILED sfms:E18 Rejected by SFMS Transaction is Give back money Business


not accepted by
the payment
body.

COMPLETED R000 Remittance


transactions has
been
successfully
processed

Fuzzy Match
POST {BASE_URL}/v3/client/kyc/fuzzy_match

Headers:

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


39
authorization: “Basic Base64encodedValueOf(client_id:client_secret)”
content-type : “application/json”

Sample Request (For Matching Name)


{

"context":"Name",

"source":{

"text": "Dinesh Rathore"

},

"target":{

"text": "Rathor Danish"

},

"confidence": 75 [default value: 75]

Sample Request (For Matching Addresses)


{

"context":"Address",

"source":{

"text": "Vattappilly house, chettupuzha po, thrissur, 680612"

},

"target":{

"text": "Vattapily house, manakkodi po, thrissur, kerala, 680612"

},

"confidence": 75 [default value: 75]

Success Response :
{
"matched": true,

"match_score": 86.0}

Android SDK with and without Machine Learning


(Native app)
Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


40
How to Integrate?

1. Download Android KYC SDK (supports androidx) by clicking this icon


2. Add Digio Android KYC SDK .aar file to your project as follows:
Note: For android studio 4.2 or later follow this link to add digio sdk in your project document here
3. In Android Studio, click on File -->New Module.
4. Click Import .JAR/.AAR Package then click Next.
5. Enter the location of the AAR file and click Finish.
6. Make sure the library is listed at the top of settings.gradle file
include ':app', ':digio-kyc-{current version}'
7. Open the app’s build.gradle(Module: app) file and add the following line
implementation project(":digio-kyc-{current version}") to the applications list of dependencies.

*Please note that {current version} will be reflected in the .aar file which is downloaded. For eg. digio-
kyc-2.1.14
*Digio SDK supports android version 5.0 and above (SDK level 21 above)

Steps to invoke

1 - Create a DigioTaskRequest List to assign task

ArrayList<DigioTaskRequest> digioTaskList = new ArrayList<>();

2- Create a DigioIDCardType List to assign ID card type

ArrayList<DigioIDCardType> idCardList = new ArrayList<>();

3- Initialize DigioTaskRequest

DigioTaskRequest idCardRequest = new DigioTaskRequest();


idCardRequest.setFaceMatch(true); // enable for face match from id_card and selfie
idCardRequest.setMinimumFaceMatch(60); // pass minimum face match percentage ( default 60)
idCardRequest.setBothSide(false); // true for front and back side of document / false only for front side
idCardRequest.setVerify(false); // enable to validate with government database
idCardRequest.setEnableFaceDetection(false); //Make it true to enable AI base face detection feature
/** setTaskType Mandatory **/
idCardRequest.setTaskType(DigioTaskType.ID_ANALYSIS); // OFFLINE_KYC / ID_ANALYSIS / SELFIE
Note: Set Task type according to business requirements.

4- Add Id Card Type and idCardRequest in List

/** Assign particular ID Type **/


idCardList.add(DigioIDCardType.PAN); // PAN / PASSPORT / VOTER ID / DRIVING_LICENCE /** optional **/

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


41
// Default SDK accepts all mentioned IDs card

/*** Set allowed id card list in object ***/


idCardRequest.setAllowedSubTypes(idCardList); /** optional add pass IDTypeList in object **/

/** Assign DigioTaskRequest in list**/


digioTaskList.add(idCardRequest); // Finally, Add Your request in digioTaskList

5- Initialize DigioConfigObject

DigioKycConfig config = new DigioKycConfig();


config.setEnvironment(DigioEnvironment.SANDBOX); // Required

// optional enable button color


config.setPrimaryColor(Color.parseColor(getString(R.color.your_color));

// optional disable button color


config.setSecondaryColor(Color.parseColor(getString(R.color.your_color));

6- Initialize DigioStateLessSession

DigioStateLessSession digioStateLessSession = new DigioStateLessSession();

7- Call digioStateLessSession.init and pass digioKycConfig object.

// clientID and clientSecret key required


digioStateLessSession.init(YourActivity.this,config,"clientID","clientSecret");

/** pass list of digioTaskList in session **/


digioStateLessSession.startStateLessSession(digioTaskList, this); // here this refers callback listener

/** alternatively you can use below startStateLessSession method for billing reconciliation **/

//digioStateLessSession.startStateLessSession(digioTaskList,"referenceId","uniqueRequestId", this);

//Make sure, uniqueRequestId is unique across all the transactions. Otherwise, you’ll get an error.

8- Implement DigioResponseListener and import onDigioResponseSuccess, onDigioResponseFailure


and onDigioEventTracker override function in your activity / fragment. Below are function signatures :

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


42
public void onDigioResponseSuccess(List<DigioTaskResponse> successResponseList){}
public void onDigioResponseFailure(List<DigioTaskResponse> failureResponseList) {}
public void onDigioEventTracker(JSONObject eventTracker){}

DigioEnvironment SANDBOX Mandatory


PRODUCTION

DigioTaskType OFFLINE_KYC DigioTaskType is a mandatory


ID_ANALYSIS option.
SELFIE

DigioIDCardType PAN Note: DigioIDCardType is optional if


PASSPORT a business requires a particular ID
VOTER_ID then pass ID card type. SDK will
DRIVING_LICENCE validate for the required ID Card.
Default SDK can accept anyone
from the above list.

Permissions

/** Mandatory **/


<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

/** Required for ID card analysis, selfie and face match**/


<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-feature android:name="android.hardware.camera" android:required="true" />


<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />

Note: Camera, read and write permission need to take at runtime

Dependencies

Include the following dependency in your build.gradle(Module) file:

// Default
implementation "androidx.core:core-ktx:1.3.1"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.72'
implementation 'com.google.android.material:material:1.0.0'

// Mandatory
implementation("com.squareup.okhttp3:okhttp:4.5.0")
Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


43
implementation 'androidx.exifinterface:exifinterface:1.2.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation "androidx.lifecycle:lifecycle-livedata:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:2.3.1"

// Required for AI camera, ID card analysis, selfie and face match


implementation "androidx.camera:camera-camera2:1.1.0-alpha10"
implementation "androidx.camera:camera-lifecycle:1.1.0-alpha10"
implementation "androidx.camera:camera-view:1.0.0-alpha30"
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.gms:play-services-mlkit-face-detection:16.2.0'

Note: All version should be latest except camera APIs

In manifest add :

<activity android:name="in.digio.sdk.kyc.cropper.DigioCropImageActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />

<activity android:name="in.digio.sdk.kyc.nativeflow.DigioIDAnalysisActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />

Possible error codes and reason

Error Code Reason

-1000 User Cancellation before KYC is complete.

1001 KYC successful completed

1002 KYC Failed

1004 Network Issues or if UIDAI’s webpage is down

1005 User exceeds OTP attempts on KYC page

1008 Required permission not provided

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


44
10012 User’s mobile number is not linked with Aadhaar

10015 Technical Exception from UIDAI

10016 UIDAI server error. Please try again in some time.

10017 Network issue UIDAI not loaded, cancelled by user

10018 UIDAI Technical issue please try after some time.

10019 UIDAI could not be loaded please try after some time.

404 UIDAI Website could not be loaded

Event list
Please refer this link to get list of events sent by SDK

Sample code

// Declare list of task and id card


ArrayList<DigioTaskRequest> digioTaskList = new ArrayList<>();
ArrayList<DigioIDCardType> idCardList = new ArrayList<>();

/** Create ID card Analysis request **/


DigioTaskRequest idCardRequest = new DigioTaskRequest();
idCardRequest.setFaceMatch(true); // enable face match (Optional)
idCardRequest.setBothSide(false); // True for both side document photo
idCardRequest.setMinimumFaceMatch(60); // Optional, Face match default value is 60%
idCardRequest.setVerify(false); // true validate from Government database
idCardRequest.setTaskType(DigioTaskType.ID_ANALYSIS);

idCardList.add(DigioIDCardType.PAN); // optional (PAN, Voter ID, Passport, DL)


idCardRequest.setAllowedSubTypes(idCardList); // assign IDcard type in object

/** Add analysis request in list **/


digioTaskList.add(idCardRequest);
/************** **************** *************/

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


45
/** Create kyc request object **/ (If business wants multiple task at one time)
DigioTaskRequest kycRequest = new DigioTaskRequest();
kycRequest.setTaskType(DigioTaskType.OFFLINE_KYC); // For Aadhaar card
kycRequest.setFaceMatch(false); // Optional, In case business required selfie and face match with
Aadhaar
kycRequest.setMinimumFaceMatch(60); // Optional, Face match default value is 60%
kycRequest.setEnableFaceDetection(false); // Optional, Make it true to enable ML face detection
feature

/*** Add KYC request in list ***/


digioTaskList.add(kycRequest);
/******* ******* *******/

/*** Digio configuration ***/


DigioKycConfig config = new DigioKycConfig();
config.setEnvironment(DigioEnvironment.SANDBOX);
config.setPrimaryColor(Color.parseColor("#17c39b"));
config.setSecondaryColor(Color.parseColor("#B4E9D8"));

/** Digio session and pass request in sdk **/


DigioStateLessSession digioStateLessSession = new DigioStateLessSession();

try {
// clientID and clientSecret key required
digioStateLessSession.init(this,config,"clientID","clientSecret");
digioStateLessSession.startStateLessSession(digioTaskList, this);

//alternatively you can use below startSession method for billing reconciliation
/** digioStateLessSession.startStateLessSession(digioTaskList,"referenceId",
"uniqueRequestId",this);
**/
} catch (Exception e) {
e.printStackTrace();
}

Sample Response

public void onDigioResponseSuccess(List<DigioTaskResponse> taskResponseList) {

for (DigioTaskResponse digiTaskResponse : taskResponseList) {

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


46
/** response param returns JSON object **/
JSONObject mainResponse = digiTaskResponse.getResponse(); // offline_kyc or idCard analysis
response

/** task param will return the request against the task**/
DigioTaskRequest digioTaskRequest = digiTaskResponse.getTask();

/** success param will give you the boolean value true/false **/
boolean value = digiTaskResponse.isSuccess();
}
}

Success Response
[
{
"task":{
"taskType":"OFFLINE_KYC",
"allowedSubTypes":[

],
"faceMatch":false,
"verify":false,
"isBothSide":false

},
"response":{
"personal_information":{
"date_of_birth":"21-08-1881",

"mobile_hash":"5eb9b114e9d8ee18e0df48724a6d6cbbf982aa822bd224924227aeef482014b0",

"email_hash":"5cc8265b2c2081761ad85e3d1c2632eb79ca6c1433a536be5052d42cd7277ccb",
"gender":"M",
"name":"John Sena"

},
"address_information":{
"country":"India",
"district":"bharatpur",
"house":"",
"location":"some colony",
"postal_code":"321203",
"post_office":"deeg",
"street":"",
"state":"rajasthan",
"sub_district":"deeg",
"virtual_town_centre":"city/town name",
"text":"some colony,deeg,deeg,deeg,bharatpur,rajasthan,India,321203"

},
"uidai_reference_id":"89462019060590990944446",
Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


47
"photo":"\/9j\/4AAQSkZJRgABQABAAD\/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBw
gJC4nICIsIxwcKDcpLDNDL......",

"raw_encoded_xml":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvU9Im5vI
j8 + PE9mZmxpbmVQYXBllc3NLeWMgcmVmZXJlbmNlSWQ9IjI1MjkyMDIwMDYAyMjM1OTUxMy.....",

"encoded_zip":"UEsDBBQACQAIAP0SylAAAAAAAAAAAAAAAAAjluZWFhZGhhYXIyMDIwMDYxMDAyMjM1\
nOTUyNi54bWwsAaNDUaS2s.....",
"Share_code":"8679",
"selfie_uri": ""
},
"success":true

},
{
"task":{
"task_type":"ID_ANALYSIS",
"allowedSubTypes":[
"PAN"

],
"faceMatch":false,
"verify":false,
"isBothSide":false

},
"response":{
"analysis_response":{
"name":"John Sena",
"fathers_name":"John Sena",
"id_no":"CQQPGHGH6G",
"dob":"2/1/1994",
"id_type":"PAN",

"encoded_image":"iVBORw0KGgoAAAANSUhEUgAAACYAAAAsCAIAAACGxF2fAAAROklEQVR42mVXB1NbWZoVS
C8\/ PeX0lAUYsLFNE2XAIItgggSIIARIIIQAgRLJgJAIEiJncCCZYBvndrfb.........."

},
"selfie_uri": "",
"id_front_uri": "",
"id_back_uri": ""

},
"success":true

}
]

Failure Response

[{
Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


48
"task":{
"taskType":"ID_ANALYSIS",
"allowedSubTypes":[
"PAN",
"VOTER_ID",
"PASSPORT"
],
"faceMatch":false,
"verify":false,
"isBothSide":false
},
"response":{
"responseCode":-1000,
"message":"User cancelled before completion."
},
"success":false
}]

SDK Journey (Snapshots)

ID Card Analysis:

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


49
KYC Flow (Aadhaar offline XML):

IOS SDK
iOS SDK for stateless(OKYC) document here

Note: Digio reserves the right to modify this API document from time-to-time. If you are a business using this API, you will be notified well in
advance, prior to any change is made

Copyright © 2019-20 | www.digio.in | For Limited Circulation


50

You might also like