Journey Builder
Shufti Pro provides a user-friendly, no-code solution for creating custom verification journeys for customers. The journey builder allows for easy customization of verification services through a smooth drag-and-drop interface. Additionally, users can set up and preview the end-user experience in real time by selecting from a variety of available KYC options, ensuring a seamless and flawless verification process for customers.
To utilize the journey builder, users can follow these simple steps:
- Drag and drop desired verification services into the journey builder.
- Configure settings for each service.
- Preview the journey behavior in real-time to verify its efficiency and customer experience.
The KYC Journey Builder consists of three parts:
- Creation of a KYC journey.
- Verification and Demos with Generated URL.
- Calling a KYC journey via API.
Creation of a KYC journey
To create a KYC journey using the KYC Journey Builder, the client should follow these steps:
- Log in to the back office and navigate to the Integration Guide.
- Locate the KYC Journey Builder, which should be prominently displayed as the first option.
- Click the Create New button located in the top right corner of the listing.
- Provide a unique name for the journey.
- Drag and drop the desired verification services into the builder.
- Configure the settings for each service by selecting from the available options, and previewing the journey behavior in real-time.
- Save the KYC journey template once it is set up to your satisfaction.
Verification and Demos with Generated URL
Clients can use the generated URL for a demo or instant verification by choosing from the following options:
- Start an instant demo by clicking the Start Demo button or sending the customer verification link.
- Request a personalized hosted verification page by clicking the Support button. It will take them to the ticket creation section in the back office.
- Customize the created verification journey code in multiple supported languages.
Calling a KYC journey via API
To use the KYC journey and verify the end-users, clients need to send an API Request with the following parameters:
Parameters | Description |
---|---|
journey_id | Required: Yes Type: string The unique ID for each KYC Journey Template. |
reference | Required: Yes Type: string Minimum: 6 characters Maximum: 250 characters Each request has a unique Reference ID which is sent back to Client against each response. The Client can use the Reference ID to check status of each verification. |
Required: No Type: string Minimum: 6 characters Maximum: 128 characters This field represents email address of the end-user. |
Please ensure that you have properly copied the correct journey_id from the KYC journey listed on the KYC Journey Builder Listing Page before passing the KYC Journey object in the API. Additionally, the KYC Journey must be saved with all necessary settings.
- Http
- Javascript
- PHP
- Python
- Ruby
- Java
- cURL
- C#
- Go
//POST / HTTP/1.1 basic auth
//Host: api.shuftipro.com
//Content-Type: application/json
//Authorization: Basic NmI4NmIyNzNmZjM0ZmNlMTlkNmI4WJRTUxINTJHUw==
{
"journey_id": "q9pDvvCx1669874968",
"reference": "1234567",
"email": "[email protected]"
}
let payload = {
reference : `SP_REQUEST_${Math.random()}`,
callback_url : "https://yourdomain.com/profile/sp-notify-callback",
country : "GB",
language : "EN"
}
//Use this key if you want to perform document verification with OCR
payload['kyb'] = {
company_registration_number : '12345',
company_jurisdiction_code : 'ae_az'
}
//BASIC AUTH TOKEN
//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/',
{
method : 'post',
headers : {
'Accept' : 'application/json',
'Content-Type' : 'application/json',
'Authorization' : 'Basic ' +token // if access token then replace "Basic" with "Bearer"
},
body: JSON.stringify(payload)
})
.then(function(response) {
return response.json();
}).then(function(data) {
if (data.event && data.event === 'verification.accepted') {
console.log(data);
}
});
<?php
$url = 'https://api.shuftipro.com/';
$client_id = 'YOUR-CLIENT-ID';
$secret_key = 'YOUR-SECRET-KEY';
$verification_request = [
"reference" => "ref-".rand(4,444).rand(4,444),
"journey_id"=> "q9pDvvCx1669874968",
"email"=> "[email protected]"
];
$auth = $client_id.":".$secret_key;
$headers = ['Content-Type: application/json'];
$post_data = json_encode($verification_request);
$response = send_curl($url, $post_data, $headers, $auth);
function send_curl($url, $post_data, $headers, $auth){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_USERPWD, $auth);
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);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$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 json_decode($body,true);
}
echo $response['verification_url'];
let payload = {
reference : `SP_REQUEST_${Math.random()}`,
journey_id : "q9pDvvCx1669874968",
email : "[email protected]"
}
var token = btoa("YOUR_CLIENT_ID:YOUR_SECRET_KEY");
fetch('https://api.shuftipro.com/', { method : 'post',
headers : {
'Accept' : 'application/json',
'Content-Type' : 'application/json',
'Authorization' : 'Basic ' +token
},
body: JSON.stringify(payload)}).then(function(response) {
return response.json();
}).then(function(data) { return data; });
import requests, base64, json, hashlib
from random import randint
url = 'https://api.shuftipro.com/'
client_id = 'YOUR-CLIENT-ID'
secret_key = 'YOUR-SECRET-KEY'
verification_request = {
"reference" : "ref-{}{}".format(randint(1000, 9999), randint(1000, 9999)),
"journey_id" : "q9pDvvCx1669874968",
"email" : "[email protected]"
}
auth = '{}:{}'.format(client_id, secret_key)
b64Val = base64.b64encode(auth.encode()).decode()
response = requests.post(url,
headers={"Authorization": "Basic %s" % b64Val, "Content-Type": "application/json"},
data=json.dumps(verification_request))
json_response = json.loads(response.content)
print('Verification URL: {}'.format(json_response))
require 'uri'
require 'net/http'
require 'base64'
require 'json'
require 'open-uri'
url = URI("https://api.shuftipro.com/")
CLIENT_ID = "YOUR-CLIENT-ID"
SECRET_KEY = "YOUR-SECRET-KEY"
verification_request = {
reference: "Ref-"+ (0...8).map { (65 + rand(26)).chr }.join,
journey_id: "q9pDvvCx1669874968",
email: "[email protected]",
}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
header_auth = Base64.strict_encode64("#{CLIENT_ID}:#{SECRET_KEY}")
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic #{header_auth}"
request.body = verification_request.to_json
response = http.request(request)
puts response.read_body
end
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";
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("POST");
con.setRequestProperty("Content-Type", "application/json");
String basicAuth = "Basic " + Base64.getEncoder().encodeToString((CLIENT_ID + ":" + SECRET_KEY).getBytes(StandardCharsets.UTF_8));
con.setRequestProperty("Authorization", basicAuth);
String payload = "{\n \"journey_id\": \"q9pDvvCx1669874968\",\n \"reference\": \"1234567\",\n \"email\": \"[email protected]\"\n}";
// Send post request
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(payload);
wr.flush();
wr.close();
int responseCode = con.getResponseCode();
System.out.println("\nSending 'POST' request to URL : " + url);
System.out.println("Payload : " + payload);
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());
}
}
curl --location --request POST 'https://api.shuftipro.com' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic NmI4NmIyNzNmZjM0ZmNlMTlkNmI4WJRTUxINTJHUw==' \
--data-raw '{
"journey_id": "q9pDvvCx1669874968",
"reference": "1234567",
"email": "[email protected]"
}'
var client = new RestClient("https://api.shuftipro.com");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Basic NmI4NmIyNzNmZjM0ZmNlMTlkNmI4WJRTUxINTJHUw==");
var body = @"{" + "\n" +
@" ""journey_id"": ""q9pDvvCx1669874968""," + "\n" +
@" ""reference"": ""1234567""," + "\n" +
@" ""email"": ""[email protected]""" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.shuftipro.com"
method := "POST"
payload := strings.NewReader(`{
"journey_id": "q9pDvvCx1669874968",
"reference": "1234567",
"email": "[email protected]"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Basic NmI4NmIyNzNmZjM0ZmNlMTlkNmI4WJRTUxINTJHUw==")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}