Declined Reasons
This end-point returns verification decline reasons with their status codes and descriptions.
- Http
- Javascript
- PHP
- Python
- Ruby
- Java
sample-decline-reasons-request
//GET /decline/reasons/ HTTP/1.1
//Host: api.shuftipro.com/
//Content-Type: application/json
//Authorization: Basic NmI4NmIyNzNmZjM0ZmNlMTlkNmI4WJRTUxINTJHUw==
// replace "Basic" with "Bearer in case of Access Token"
sample-decline-reasons-request
//Use your Shufti Pro account client id and secret key
var token = btoa("YOUR_CLIENT_ID:YOUR_SECRET_KEY"); //BASIC AUTH TOKEN
// if Access Token
//var token = "YOUR_ACCESS_TOKEN";
//Dispatch request via fetch API or with whatever else which best suits for you
fetch('https://api.shuftipro.com/decline/reasons',
{
method : 'get',
headers : {
'Accept' : 'application/json',
'Content-Type' : 'application/json',
'Authorization' : 'Basic ' +token // if access token then replace "Basic" with "Bearer"
}
})
.then(function(response) {
return response.json();
}).then(function(data) {
return data;
});
sample-decline-reasons-request
<?php
$url = 'https://api.shuftipro.com/decline/reasons';
//Your Shufti Pro account Client ID
$client_id = 'YOUR-CLIENT-ID';
//Your Shufti Pro account Secret Key
$secret_key = 'YOUR-SECRET-KEY';
//OR Access Token
//$access_token = 'YOUR-ACCESS-TOKEN';
$auth = $client_id.":".$secret_key; // remove this in case of Access Token
$headers = ['Content-Type: application/json'];
// if using Access Token then add it into headers as mentioned below otherwise remove access token
// array_push($headers, 'Authorization: Bearer ' . $access_token);
//Calling Shufti Pro request API using curl
$response = send_curl($url, $headers, $auth); // remove $auth in case of Access Token
//Get Shufti Pro API Response
$response_data = $response['body'];
//Get Shufti Pro Signature
$exploded = explode("\n", $response['headers']);
// Get Signature Key from Hearders
$sp_signature = null;
foreach ($exploded as $key => $value) {
if (strpos($value, 'signature: ') !== false || strpos($value, 'Signature: ') !== false) {
$sp_signature=trim(explode(':', $exploded[$key])[1]);
break;
}
}
//Calculating signature for verification
// calculated signature functionality cannot be implement in case of access token
$calculate_signature = hash('sha256',$response_data.$secret_key);
if($sp_signature == $calculate_signature){
echo "Response :" . $response_data;
}else{
echo "Invalid signature :" . $response_data;
}
function send_curl($url, $headers, $auth){ // remove $auth in case of Access Token
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERPWD, $auth); // remove this in case of Access Token
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); // remove this in case of Access Token
$html_response = curl_exec($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$headers = substr($html_response, 0, $header_size);
$body = substr($html_response, $header_size);
curl_close($ch);
return ['headers' => $headers,'body' => $body];
}
?>
sample-decline-reasons-request
import base64, requests, json, hashlib
from random import randint
'''
Python 2
--------
import urllib2
Python 3
--------
import urllib.request
urllib.request.urlopen(url).read()
'''
url = 'https://api.shuftipro.com/decline/reasons'
# Your Shufti Pro account Client ID
client_id = 'YOUR-CLIENT-ID'
# Your Shufti Pro account Secret Key
secret_key = 'YOUR-SECRET-KEY'
# OR Access Token
# access_token = 'YOUR-ACCESS-TOKEN';
# Calling Shufti Pro request API using python requests
auth = '{}:{}'.format(client_id, secret_key)
b64Val = base64.b64encode(auth.encode()).decode()
# if access token
# b64Val = access_token
# replace "Basic with "Bearer" in case of Access Token
response = requests.get(url,
headers={"Authorization": "Basic %s" % b64Val, "Content-Type": "application/json"})
# Calculating signature for verification
# calculated signature functionality cannot be implement in case of access token
calculated_signature = hashlib.sha256('{}{}'.format(response.content.decode(), secret_key).encode()).hexdigest()
# Convert json string to json object
json_response = json.loads(response.content)
sp_signature = response.headers.get('Signature','')
if sp_signature == calculated_signature:
print ('Response : {}'.format(json_response))
else:
print ('Invalid Signature: {}'.format(json_response))
sample-decline-reasons-request
require 'uri'
require 'net/http'
require 'base64'
require 'json'
url = URI("https://api.shuftipro.com/decline/reasons")
# Your Shufti Pro account Client ID
CLIENT_ID = "YOUR-CLIENT-ID"
# Your Shufti Pro account Secret Key
SECRET_KEY = "YOUR-SECRET-KEY"
# if access token
# ACCESS_TOKEN = "YOUR-ACCESS-TOKEN"
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
header_auth = Base64.strict_encode64("#{CLIENT_ID}:#{SECRET_KEY}")
# if Access Token
# header_auth = ACCESS_TOKEN
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic #{header_auth}" # replace "Basic" with "Bearer" in case of access token
response = http.request(request)
response_headers = response.instance_variable_get("@header")
response_data = response.read_body
sp_signature = !(response_headers['signature'].nil?) ? response_headers['signature'].join(',') : ""
# calculated signature functionality cannot be implement in case of access token
calculated_signature = Digest::SHA256.hexdigest response_data + SECRET_KEY
if sp_signature == calculated_signature
puts response_data
else
puts "Invalid signature"
end
sample-decline-reasons-request
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import javax.net.ssl.HttpsURLConnection;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.shuftipro.com/decline/reasons";
String CLIENT_ID = "CLIENT_ID";
String SECRET_KEY = "SECRET_KEY";
URL obj = new URL(url);
HttpsURLConnection con = (HttpsURLConnection) obj.openConnection();
// Add request header
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type", "application/json");
String basicAuth = "Basic " + Base64.getEncoder().encodeToString((CLIENT_ID + ":" + SECRET_KEY).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", basicAuth);
int responseCode = con.getResponseCode();
System.out.println("\nSending 'GET' request to URL : " + url);
System.out.println("Response Code : " + responseCode);
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
System.out.println(in.toString());
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
// Print the response
System.out.println(response.toString());
}
}
sample-decline-reason-response
{
"decline_reasons": [
{
"status_code": "SPDR01",
"description": "Face could not be verified"
},
{
"status_code": "SPDR02",
"description": "Image of the face not found on the document"
}
]
}
Face Status Codes
Status Code | Description |
---|---|
SPDR01 | Face could not be verified |
SPDR19 | Face could not be detected in image, please upload image again with your face clearly visible |
SPDR03 | Image is altered or photoshopped |
SPDR04 | Copy of the image found on web |
SPDR58 | Face in the image is with wearing glasses |
SPDR59 | Face proof is from another screen |
SPDR60 | Face proof is taken from the web |
SPDR61 | More than one face in one image |
SPDR62 | Face proof is a screenshot |
SPDR38 | Face doesn't match the face image uploaded at the time of signup |
SPDR39 | Document doesn’t match the document uploaded at the time of signup |
SPDR43 | Camera is not accessible for verification |
SPDR268 | The provided image is corrupted |
Document & Document Two Status Code
Status Code | Description |
---|---|
SPDR02 | Image of the face not found on the document |
SPDR05 | Names on both the documents do not match |
SPDR06 | Document originality could not be verified |
SPDR07 | Name on the document doesn't match |
SPDR08 | DOB on the document doesn't match |
SPDR14 | Age could not be verified |
SPDR16 | The expiry date of the document does not match the record, please upload a document with valid expiry date |
SPDR10 | Issue date on the document doesn't match |
SPDR09 | Date on the document doesn't match |
SPDR11 | Number on the document doesn't match |
SPDR12 | The issuing country of document is not supported, please upload a valid document |
SPDR13 | Document doesn't match the provided options |
SPDR14 | You are not eligible because you doesn't fall in the provided age range |
SPDR15 | Face on the document doesn't match with camera image |
SPDR17 | The document is expired, please upload a new document which is not expired |
SPDR18 | The uploaded image of the document is blur, please provide a clear photo of document |
SPDR19 | Face could not be detected in image, please upload image again with your face clearly visible |
SPDR03 | Image is altered or photoshopped |
SPDR04 | Copy of the image found on web |
SPDR21 | Proof and Additional Proof are of different documents |
SPDR36 | Both Documents do not belong to the same person |
SPDR42 | Front and backside images of the document did not match, please upload images of the same document |
SPDR47 | Document proof is a screenshot |
SPDR48 | Document proof is altered/edited |
SPDR49 | Document proof is paper based which is not accepted |
SPDR50 | Document proof is punched/broken |
SPDR51 | Document proof is from another screen |
SPDR52 | Hologram is missing on the document |
SPDR53 | Document proof is not fully displayed. |
SPDR54 | Document is blur |
SPDR55 | Information on the document proof is not visible |
SPDR56 | Information on the document is edited |
SPDR57 | Information on the document is hidden |
SPDR67 | Document should be from the provided country |
SPDR68 | Issue date does not match with the provided one |
SPDR69 | Expiry date does not match with the provided one |
SPDR70 | Submitted document is expired |
SPDR71 | Issue date on the document is not clearly visible |
SPDR72 | Expiry date on the document is not clearly visible |
SPDR73 | Date of Birth on the document does not match with the provided one |
SPDR74 | Date of Birth on the document is not clearly visible |
SPDR75 | Name on the document does not match with the provided one |
SPDR76 | Name on the document is not clearly visible |
SPDR77 | Document number does not match with the provided one |
SPDR78 | Document number is not clearly visible |
SPDR79 | Original document number could not be authenticated |
SPDR63 | Front and backside images are not of the same document |
SPDR64 | Proof and additional proof does not belong to the same person |
SPDR65 | Address proof and document proof does not match |
SPDR66 | Both documents should belong to the same person |
SPDR39 | Document doesn’t match the document uploaded at the time of signup |
SPDR43 | Camera is not accessible for verification |
SPDR44 | Gender could not be verified |
SPDR45 | Place of issue could not be verified |
SPDR45 | Place of issue could not be verified |
SPDR86 | E-document data does not match with provided document proof |
SPDR87 | Face on the E-document does not match with selfie |
SPDR88 | Uploaded document is Black and White |
SPDR89 | Uploaded image of the document is edited or cropped |
SPDR90 | Uploaded image is found on the internet |
SPDR91 | Document is laminated |
SPDR92 | Document is scanned or colored copy |
SPDR93 | Document is paper-based or laminated |
SPDR94 | Uploaded document is a test card |
SPDR187 | Nationality could not be verified. |
SPDR190 | The provided document is broken |
SPDR193 | The provided document is photocopy(color or black & white) |
SPDR194 | The provided document is edited. |
SPDR197 | The provided document is scanned |
SPDR200 | The provided document is punched |
SPDR201 | The provided document is cracked |
SPDR202 | The provided document is cropped |
SPDR203 | The provided document is handwritten |
SPDR204 | Document does not belong to GCC countries |
SPDR205 | Document type is not supported. |
SPDR206 | Document type is not allowed. |
SPDR207 | MRZ not detected on the document |
SPDR208 | The provided document is blank |
SPDR209 | Student card is not acceptable |
SPDR210 | Dual cards detected |
SPDR211 | The uploaded document is not supported |
SPDR268 | The provided image is corrupted |
Address Status Code
Status Code | Description |
---|---|
SPDR02 | Image of the face not found on the document |
SPDR06 | Document originality could not be verified |
SPDR14 | Age could not be verified |
SPDR22 | Name on the Address Document doesn't match |
SPDR23 | Address did not match the record, please provide a document with valid address. |
SPDR24 | Document type is different from the provided options |
SPDR25 | Country on the address document could not be verified |
SPDR26 | Addresses on the Identity Document and Utility Bill do not match |
SPDR27 | The address document is expired, please upload a document which is not expired |
SPDR28 | The uploaded image of the document is blur, please provide a clear photo of address document |
SPDR13 | Document doesn't match the provided options |
SPDR30 | Issue date on the address document doesn't match |
SPDR03 | Image is altered or photoshopped |
SPDR04 | Copy of the image found on web |
SPDR21 | Proof and Additional Proof are of different documents |
SPDR31 | Address proof and document proof are of different persons |
SPDR42 | Front and backside images of the document did not match, please upload images of the same document |
SPDR47 | Document proof is a screenshot |
SPDR48 | Document proof is altered/edited |
SPDR49 | Document proof is paper based which is not accepted |
SPDR50 | Document proof is punched/broken |
SPDR51 | Document proof is from another screen |
SPDR52 | Hologram is missing on the document |
SPDR53 | Document proof is not fully displayed. |
SPDR54 | Document is blur |
SPDR55 | Information on the document proof is not visible |
SPDR56 | Information on the document is edited |
SPDR57 | Information on the document is hidden |
SPDR67 | Document should be from the provided country |
SPDR68 | Issue date does not match with the provided one |
SPDR69 | Expiry date does not match with the provided one |
SPDR70 | Submitted document is expired |
SPDR71 | Issue date on the document is not clearly visible |
SPDR72 | Expiry date on the document is not clearly visible |
SPDR73 | Date of Birth on the document does not match with the provided one |
SPDR74 | Date of Birth on the document is not clearly visible |
SPDR75 | Name on the document does not match with the provided one |
SPDR76 | Name on the document is not clearly visible |
SPDR77 | Document number does not match with the provided one |
SPDR78 | Document number is not clearly visible |
SPDR79 | Original document number could not be authenticated |
SPDR65 | Address proof and document proof does not match |
SPDR66 | Both documents should belong to the same person |
SPDR80 | Address on the document does not match with the provided one |
SPDR81 | Address provided is invalid |
SPDR82 | Address on the document is not clearly visible |
SPDR83 | Address could not be validated |
SPDR14 | You are not eligible because you doesn't fall in the provided age range |
SPDR43 | Camera is not accessible for verification |
SPDR46 | Same ID Document can not be submitted as proof of address |
SPDR88 | Uploaded document is Black and White |
SPDR89 | Uploaded image of the document is edited or cropped |
SPDR90 | Uploaded image is found on the internet |
SPDR91 | Document is laminated |
SPDR92 | Document is scanned or colored copy |
SPDR93 | Document is paper-based or laminated |
SPDR94 | Uploaded document is a test card |
SPDR112 | Country on the address document could not verified |
SPDR188 | Bank Transfer Number could not be verified |
SPDR189 | Tax Identity Number could not be verified |
SPDR190 | The provided document is broken |
SPDR193 | The provided document is photocopy(color or black & white) |
SPDR194 | The provided document is edited. |
SPDR197 | The provided document is scanned |
SPDR200 | The provided document is punched |
SPDR201 | The provided document is cracked |
SPDR202 | The provided document is cropped |
SPDR203 | The provided document is handwritten |
SPDR268 | The provided image is corrupted |
Consent Status Code
Status Code | Description |
---|---|
SPDR02 | Image of the face not found on the document |
SPDR32 | Consent note information is not correct, please upload a note with valid information |
SPDR33 | Consent type is different from provided options |
SPDR03 | Image is altered or photoshopped |
SPDR04 | Copy of the image found on web |
SPDR43 | Camera is not accessible for verification |
Background Checks Status Code
Status Code | Description |
---|---|
SPDR34 | AML screening failed |
SPDR160 | AML screening failed. User found in Sanction lists |
SPDR161 | AML screening failed. User found in Warning lists |
SPDR162 | AML screening failed. User found in Fitness-Probity lists |
SPDR163 | AML screening failed. User found in PEP lists |
SPDR164 | AML screening failed. User found in Adverse-Media lists |
Phone Number Status Code
If the user is unable to receive code then, user is provide with Code not received option if user clicks the “Code not received” option the verification will be declined automatically (because either the phone number was wrong or unreachable).
caution
Verification is declined if a user enters the wrong code consecutively for five times.
Status Code | Description |
---|---|
SPDR35 | Your phone number did not match the record, please provide a valid phone number |
SPDR84 | Phone number not verified because end-user entered the wrong code multiple times |
SPDR85 | Phone number not verified because the provided number was unreachable |