Compare Faces
curl --request POST \
--url https://api.payvessel.com/kyc/api/v1/merchant/face/compare \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-secret>' \
--data '
{
"source_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"target_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
'import requests
url = "https://api.payvessel.com/kyc/api/v1/merchant/face/compare"
payload = {
"source_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"target_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-secret>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-secret>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
source_image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...',
target_image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...'
})
};
fetch('https://api.payvessel.com/kyc/api/v1/merchant/face/compare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.payvessel.com/kyc/api/v1/merchant/face/compare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_image' => 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...',
'target_image' => 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"api-key: <api-key>",
"api-secret: <api-secret>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.payvessel.com/kyc/api/v1/merchant/face/compare"
payload := strings.NewReader("{\n \"source_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n \"target_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<api-secret>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.payvessel.com/kyc/api/v1/merchant/face/compare")
.header("api-key", "<api-key>")
.header("api-secret", "<api-secret>")
.header("Content-Type", "<content-type>")
.body("{\n \"source_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n \"target_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/kyc/api/v1/merchant/face/compare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["api-secret"] = '<api-secret>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"source_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n \"target_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Face comparison completed successfully",
"data": {
"similarity": "0.93"
},
"charges": {
"charged": false,
"charged_amount": "0.00"
}
}{
"success": false,
"message": "Your wallet balance is insufficient for this request. Required 25.00, available 0. Please fund your wallet and try again.",
"details": [
"Your wallet balance is insufficient for this request. Required 25.00, available 0. Please fund your wallet and try again."
]
}Identity Verification
Compare Faces
Compare two face images and return a similarity score.
POST
/
api
/
v1
/
merchant
/
face
/
compare
Compare Faces
curl --request POST \
--url https://api.payvessel.com/kyc/api/v1/merchant/face/compare \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-secret>' \
--data '
{
"source_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"target_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
'import requests
url = "https://api.payvessel.com/kyc/api/v1/merchant/face/compare"
payload = {
"source_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...",
"target_image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD..."
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-secret>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-secret>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
source_image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...',
target_image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...'
})
};
fetch('https://api.payvessel.com/kyc/api/v1/merchant/face/compare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.payvessel.com/kyc/api/v1/merchant/face/compare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_image' => 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...',
'target_image' => 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"api-key: <api-key>",
"api-secret: <api-secret>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.payvessel.com/kyc/api/v1/merchant/face/compare"
payload := strings.NewReader("{\n \"source_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n \"target_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<api-secret>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.payvessel.com/kyc/api/v1/merchant/face/compare")
.header("api-key", "<api-key>")
.header("api-secret", "<api-secret>")
.header("Content-Type", "<content-type>")
.body("{\n \"source_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n \"target_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/kyc/api/v1/merchant/face/compare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["api-secret"] = '<api-secret>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"source_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n \"target_image\": \"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Face comparison completed successfully",
"data": {
"similarity": "0.93"
},
"charges": {
"charged": false,
"charged_amount": "0.00"
}
}{
"success": false,
"message": "Your wallet balance is insufficient for this request. Required 25.00, available 0. Please fund your wallet and try again.",
"details": [
"Your wallet balance is insufficient for this request. Required 25.00, available 0. Please fund your wallet and try again."
]
}Headers
Your Payvessel public API key
Your Payvessel secret
Request content type
Available options:
application/json Body
application/json
⌘I
