Create or update customer verification (KYC)
curl --request PUT \
--url https://{subdomain}.truust.io/2.0/verifications/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "NATURAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "12345678A",
"legal_address": "Calle Mayor 1",
"legal_city": "Madrid",
"legal_zip": "28001",
"legal_state": "Madrid",
"legal_country": "ES"
}
'import requests
url = "https://{subdomain}.truust.io/2.0/verifications/{uuid}"
payload = {
"type": "NATURAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "12345678A",
"legal_address": "Calle Mayor 1",
"legal_city": "Madrid",
"legal_zip": "28001",
"legal_state": "Madrid",
"legal_country": "ES"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'NATURAL',
first_name: 'John',
last_name: 'Doe',
vat_id: '12345678A',
legal_address: 'Calle Mayor 1',
legal_city: 'Madrid',
legal_zip: '28001',
legal_state: 'Madrid',
legal_country: 'ES'
})
};
fetch('https://{subdomain}.truust.io/2.0/verifications/{uuid}', 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://{subdomain}.truust.io/2.0/verifications/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'NATURAL',
'first_name' => 'John',
'last_name' => 'Doe',
'vat_id' => '12345678A',
'legal_address' => 'Calle Mayor 1',
'legal_city' => 'Madrid',
'legal_zip' => '28001',
'legal_state' => 'Madrid',
'legal_country' => 'ES'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{subdomain}.truust.io/2.0/verifications/{uuid}"
payload := strings.NewReader("{\n \"type\": \"NATURAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"12345678A\",\n \"legal_address\": \"Calle Mayor 1\",\n \"legal_city\": \"Madrid\",\n \"legal_zip\": \"28001\",\n \"legal_state\": \"Madrid\",\n \"legal_country\": \"ES\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{subdomain}.truust.io/2.0/verifications/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"NATURAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"12345678A\",\n \"legal_address\": \"Calle Mayor 1\",\n \"legal_city\": \"Madrid\",\n \"legal_zip\": \"28001\",\n \"legal_state\": \"Madrid\",\n \"legal_country\": \"ES\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/verifications/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"NATURAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"12345678A\",\n \"legal_address\": \"Calle Mayor 1\",\n \"legal_city\": \"Madrid\",\n \"legal_zip\": \"28001\",\n \"legal_state\": \"Madrid\",\n \"legal_country\": \"ES\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"self": "<string>",
"uuid": "<string>",
"type": "INDIVIDUAL",
"status": "CREATED",
"refused_reason": "<string>",
"connections": {}
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Verifications
Submit Verification (KYC)
Submits KYC information for a customer. Supported types are INDIVIDUAL, SELFEMPLOYEE, and LEGAL.
For LEGAL type, representative information is required.
PUT
/
verifications
/
{uuid}
Create or update customer verification (KYC)
curl --request PUT \
--url https://{subdomain}.truust.io/2.0/verifications/{uuid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "NATURAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "12345678A",
"legal_address": "Calle Mayor 1",
"legal_city": "Madrid",
"legal_zip": "28001",
"legal_state": "Madrid",
"legal_country": "ES"
}
'import requests
url = "https://{subdomain}.truust.io/2.0/verifications/{uuid}"
payload = {
"type": "NATURAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "12345678A",
"legal_address": "Calle Mayor 1",
"legal_city": "Madrid",
"legal_zip": "28001",
"legal_state": "Madrid",
"legal_country": "ES"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'NATURAL',
first_name: 'John',
last_name: 'Doe',
vat_id: '12345678A',
legal_address: 'Calle Mayor 1',
legal_city: 'Madrid',
legal_zip: '28001',
legal_state: 'Madrid',
legal_country: 'ES'
})
};
fetch('https://{subdomain}.truust.io/2.0/verifications/{uuid}', 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://{subdomain}.truust.io/2.0/verifications/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'NATURAL',
'first_name' => 'John',
'last_name' => 'Doe',
'vat_id' => '12345678A',
'legal_address' => 'Calle Mayor 1',
'legal_city' => 'Madrid',
'legal_zip' => '28001',
'legal_state' => 'Madrid',
'legal_country' => 'ES'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{subdomain}.truust.io/2.0/verifications/{uuid}"
payload := strings.NewReader("{\n \"type\": \"NATURAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"12345678A\",\n \"legal_address\": \"Calle Mayor 1\",\n \"legal_city\": \"Madrid\",\n \"legal_zip\": \"28001\",\n \"legal_state\": \"Madrid\",\n \"legal_country\": \"ES\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{subdomain}.truust.io/2.0/verifications/{uuid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"NATURAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"12345678A\",\n \"legal_address\": \"Calle Mayor 1\",\n \"legal_city\": \"Madrid\",\n \"legal_zip\": \"28001\",\n \"legal_state\": \"Madrid\",\n \"legal_country\": \"ES\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/verifications/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"NATURAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"12345678A\",\n \"legal_address\": \"Calle Mayor 1\",\n \"legal_city\": \"Madrid\",\n \"legal_zip\": \"28001\",\n \"legal_state\": \"Madrid\",\n \"legal_country\": \"ES\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"self": "<string>",
"uuid": "<string>",
"type": "INDIVIDUAL",
"status": "CREATED",
"refused_reason": "<string>",
"connections": {}
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Authorizations
Use your account's Secret Key as the Bearer token.
Path Parameters
Verification UUID.
Body
application/json
Verification type. NATURAL for individuals, SOLETRADER for self-employed, LEGAL for companies.
Available options:
NATURAL, SOLETRADER, LEGAL Maximum string length:
255Maximum string length:
255Tax identification number (DNI, NIF, CIF, etc.).
Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255ISO 3166-1 alpha-2 country code.
Maximum string length:
2Company legal name. Required for LEGAL type.
Maximum string length:
255Required for LEGAL type.
Required for LEGAL type.
Required for LEGAL type.
Response
Verification submitted
