KYC Details
Manage user kyc details.
Get Documents
GET
‎https://<domain>/<api prefix>/<version>/user/kyc/documents/
This API endpoint will return kyc document data with verify status.
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"documents": {
"<document_key>": {
"type": "<doc_type>",
"doc_type": "<doc_key>",
"doc_name": "<doc_name>",
"verify_status": <verify_status>,
"note": "<note>",
"data":"<base64_data>"
},
...
},
"kyc_verify_status": <kyc_verify_status>
}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Upload Documents
POST
‎https://<domain>/<api prefix>/<version>/user/kyc/documents/
This API endpoint will upload user kyc documents.
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
Request Body
document
string
ID Proof :- Allowed file formats includes: Documents(.PDF) and Images (.JPG, .PNG) and maximum size: 8MB.
document1
string
Utility Bills:- Allowed file formats includes: Documents(.PDF) and Images (.JPG, .PNG) and maximum size: 8MB.
document2
string
Account statement:-Allowed file formats includes: Documents(.PDF) and Images (.JPG, .PNG) and maximum size: 8MB.
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
var request = require('request');
var fs = require('fs');
var options = {
'method': 'POST',
'url': 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {
'document': {
'value': fs.createReadStream('<file_path>'),
'options': {
'filename': '<file_name>',
'contentType': null
}
},
'document1': {
'value': fs.createReadStream('<file_path>'),
'options': {
'filename': '<file_name>'
'contentType': null
}
},
'document2': {
'value': fs.createReadStream('<file_path>'),
'options': {
'filename': '<file_name>',
'contentType': null
}
}
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('document'=> new CURLFILE('<file_path>'),'document1'=> new CURLFILE('<file_path>'),'document2'=> new CURLFILE('<file_path>')),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
Status Code
Error Type
FIeld
Description
401
Request Failed
Please upload all required KYC documents and submit the form.
Maximum upload size is 8MB.
400
Validation Error
document,
document1,
document2
File type '<file_type>' is not allowed. Allowed types are: 'image/png, application/pdf, image/jpeg'.
Delete Document
DELETE
‎https://<domain>/<api prefix>/<version>/user/kyc/documents/
This API endpoint will delete a kyc document.
Query Parameters
remove_doc
string
Document key: document, document1 or document2.
Headers
apikey*
string
Apikey
Authorization*
string
Bearer access token
HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
var request = require('request');
var options = {
'method': 'DELETE',
'url': 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'apikey: apikey',
'Authorization: Bearer <access token>',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Error Responses
Status Code
Error Type
FIeld
Description
401
Request Failed
Sorry! Some error occurred. You can not remove your document now.
KYC Documents not found.
400
Validation Error
remove_doc
This field is required and it may not be blank.
Invalid document key.
Last updated
Was this helpful?