KYC Details
Manage user kyc details.

Get Documents

get
β€Ž
https://<domain>/<api prefix>/<version>/user/kyc/documents/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
14
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'apikey: <apikey>',
16
'Authorization: Bearer <access token>',
17
),
18
));
19
​
20
$response = curl_exec($curl);
21
​
22
curl_close($curl);
23
echo $response;
Copied!

Upload Documents

post
β€Ž
https://<domain>/<api prefix>/<version>/user/kyc/documents/

Sample Code

Node
1
var request = require('request');
2
var fs = require('fs');
3
var options = {
4
'method': 'POST',
5
'url': 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
6
'headers': {
7
'apikey': '<apikey>',
8
'Authorization': 'Bearer <access token>',
9
},
10
formData: {
11
'document': {
12
'value': fs.createReadStream('<file_path>'),
13
'options': {
14
'filename': '<file_name>',
15
'contentType': null
16
}
17
},
18
'document1': {
19
'value': fs.createReadStream('<file_path>'),
20
'options': {
21
'filename': '<file_name>'
22
'contentType': null
23
}
24
},
25
'document2': {
26
'value': fs.createReadStream('<file_path>'),
27
'options': {
28
'filename': '<file_name>',
29
'contentType': null
30
}
31
}
32
}
33
};
34
request(options, function (error, response) {
35
if (error) throw new Error(error);
36
console.log(response.body);
37
});
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS => array('document'=> new CURLFILE('<file_path>'),'document1'=> new CURLFILE('<file_path>'),'document2'=> new CURLFILE('<file_path>')),
15
CURLOPT_HTTPHEADER => array(
16
'apikey: <apikey>',
17
'Authorization: Bearer <access token>',
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
25
​
Copied!

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/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'DELETE',
4
'url': 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
14
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/kyc/documents/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'DELETE',
14
CURLOPT_HTTPHEADER => array(
15
'apikey: apikey',
16
'Authorization: Bearer <access token>',
17
),
18
));
19
​
20
$response = curl_exec($curl);
21
​
22
curl_close($curl);
23
echo $response;
Copied!

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 modified 2mo ago