Interactive
Facia’s Interactive KYC solution is designed for real-time, user-facing identity verification. It guides individuals through a seamless, step-by-step flow that includes liveness detection, facial matching, and document verification and AML, all within a secure and intuitive interface. This approach ensures maximum engagement and accuracy by capturing data directly from the end-user during the session. Ideal for digital onboarding, financial services, and any environment requiring real-time user authentication, the interactive mode enhances trust, reduces fraud risk, and supports regulatory compliance with minimal friction.
- Quick Liveness detection
- Document OCR
- Face Match
- Document Verification
- Anti Money Laundering (AML)
These components work together within a unified framework to deliver accurate results while reducing manual review and user friction.
Generate KYC URL
To generate the KYC verification, send a request to the following endpoint with the mentioned sample payload. The KYC URL can be obtained from the API at:
Endpoint
POSThttps://api.facia.ai/generate-liveness-url
Authorization:
Token Type: BearerDescription:
This API utilizes Access token or Client-Secret key in header for authentication.
You can use your client_id and client_secret key when using the "/request-access-token" endpoint to obtain a Bearer token for authorization while connecting to this API. For additional details on Authorization, click Here
Request Body Samples:
- HTTP
- Javascript
- Curl
- PHP
- Python
- Ruby
- Java
- C#
- Go
//POST /generate-liveness-url HTTP/1.1
//Host: api.facia.ai
//Content-Type: application/json
//Authorization: Bearer <access-token-here>
{
"is_kyc_request": true,
"services": [
"quick_liveness",
"face_match",
"document_ocr",
"document_verification",
"aml",
],
"redirect_url": "https://www.example.com",
"callback_url": "https://www.example.exc.com",
"ttl": 60
}
const accessToken = '<access-token-here>';
const url = 'https://api.facia.ai/generate-liveness-url';
const requestBody = {
is_kyc_request: true,
services: [
"quick_liveness",
"face_match",
"document_ocr",
"document_verification",
"aml",
],
redirect_url: "https://www.example.com",
callback_url: "https://www.example.exc.com",
ttl: 60
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`
},
body: JSON.stringify(requestBody)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -X POST https://api.facia.ai/generate-liveness-url \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <access-token-here>" \
-d '{
"is_kyc_request": true,
"services": ["quick_liveness", "face_match", "document_ocr", "document_verification", "aml"],
"redirect_url": "https://www.example.com",
"callback_url": "https://www.example.exc.com",
"ttl": 60
}'
<?php
$accessToken = '<access-token-here>';
$url = 'https://api.facia.ai/generate-liveness-url';
$data = [
'is_kyc_request' => true,
'services' => ['quick_liveness', 'face_match', 'document_ocr', 'document_verification', 'aml'],
'redirect_url' => 'https://www.example.com',
'callback_url' => 'https://www.example.exc.com',
'ttl' => 60
];
$options = [
'http' => [
'header' => "Content-Type: application/json\r\n" .
"Authorization: Bearer $accessToken\r\n",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
echo $response;
import requests
import json
url = 'https://api.facia.ai/generate-liveness-url'
access_token = '<access-token-here>'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
"is_kyc_request": True,
"services": ["quick_liveness", "face_match", "document_ocr", "document_verification", "aml"],
"redirect_url": "https://www.example.com",
"callback_url": "https://www.example.exc.com",
"ttl": 60
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.facia.ai/generate-liveness-url')
access_token = '<access-token-here>'
header = {
'Content-Type' => 'application/json',
'Authorization' => "Bearer #{access_token}"
}
data = {
is_kyc_request: true,
services: ["quick_liveness", "face_match", "document_ocr", "document_verification", "aml"],
redirect_url: "https://www.example.com",
callback_url: "https://www.example.exc.com",
ttl: 60
}
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.path, header)
request.body = data.to_json
response = http.request(request)
puts response.body
import java.io.*;
import java.net.*;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws IOException {
String accessToken = "<access-token-here>";
String urlString = "https://api.facia.ai/generate-liveness-url";
URL url = new URL(urlString);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Authorization", "Bearer " + accessToken);
connection.setDoOutput(true);
String jsonBody = "{\n" +
" \"is_kyc_request\": true,\n" +
" \"services\": [\"quick_liveness\", \"face_match\", \"document_ocr\", \"document_verification\", \"aml\"],\n" +
" \"redirect_url\": \"https://www.example.com\",\n" +
" \"callback_url\": \"https://www.example.exc.com\",\n" +
" \"ttl\": 60\n" +
"}";
try (OutputStream os = connection.getOutputStream()) {
byte[] input = jsonBody.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
try (BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
String responseLine;
StringBuilder response = new StringBuilder();
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
System.out.println(response.toString());
}
}
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var accessToken = "<access-token-here>";
var url = "https://api.facia.ai/generate-liveness-url";
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
var data = new
{
is_kyc_request = true,
services = new string[] { "quick_liveness", "face_match", "document_ocr", "document_verification", "aml" },
redirect_url = "https://www.example.com",
callback_url = "https://www.example.exc.com",
ttl = 60
};
var json = Newtonsoft.Json.JsonConvert.SerializeObject(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
accessToken := "<access-token-here>"
url := "https://api.facia.ai/generate-liveness-url"
requestBody := map[string]interface{}{
"is_kyc_request": true,
"services": []string{
"quick_liveness", "face_match", "document_ocr", "document_verification", "aml",
},
"redirect_url": "https://www.example.com",
"callback_url": "https://www.example.exc.com",
"ttl": 60,
}
jsonData, err := json.Marshal(requestBody)
if err != nil {
log.Fatal(err)
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
log.Fatal(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+accessToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
Parameters | Description |
---|---|
is_kyc_request | Required: Yes Type: Boolean Example: is_kyc_request=true This flag must be set to true to indicate that the request is for initiating a KYC process. |
services | Required: Yes Type: Array of Strings Allowed values: quick_liveness , document_ocr , document_verification , face_match , aml At least one service must be selected. |
redirect_url | Required: No Type: String Example: redirect_url=https://www.example.com/?64db8940a619c1692109120 Indicates the URL to be used for post-transaction redirection. |
callback_url | Required: No Type: String Example: callback_url=https://www.example.exc.com/ Multiple server-to-server calls are initiated to communicate updates on verification status to Facia’s clients. |
ttl | Required: No Type: Integer Example: ttl=60 Minimum: 1 minute Maximum: 43200 minutes (30 days) Default: 60 minutes Specifies the time-to-live (TTL) in minutes, indicating the duration until the link expires. |
Response Sample
{
"status": true,
"message": "Success",
"result": {
"data": {
"liveness_url": "https://app.facia.ai/?64db8940a619c1692109120",
"reference_id": "W4437KIWN0KDM13",
"callback_url": "https://www.example.exc.com",
"redirect_url": "https://www.example.com"
}
}
}
Response Parameter
Parameters | Description |
---|---|
status | Type: Boolean Example: true or false Indicates whether the request was successful ( true ) or not (false ). |
message | Type: String Descriptive message corresponding to the request status. |
errors | Type: Object (present only if status is false )contains errors explaining why the request failed. |
result.data.liveness_url | The link to perform KYC. Example: liveness_url=https://app.facia.ai/?64db8940a619c1692109120 |
result.data.reference_id | The unique identified associated with the created transaction. |
result.data.callback_url | The link where the transaction response will be sent. Example: callback_url=https://www.example.exc.com/ |
result.data.redirect_url | Indicate the URL to be used for post-transaction redirection. |
iFrame Integration
Integrate the kyc iFrame into your platform to ensure users are physically present during interactions. Use the code snippet below to embed the iframe and pass the liveness_url
which you got in response of generate-liveness-url endpoint within the src attribute of the iFrame.
<iframe
src="liveness_url"
allow="camera"
style="width: 100%; height: 600px; border: none;"
></iframe>
For optimal user experience, we recommend:
- Minimum width: 375px
- Minimum height: 600px
- Responsive layout that adjusts to the container size