Verify account
curl --request POST \
--url https://{subdomain}.truust.io/2.0/accounts/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "LEGAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "123456789",
"legal_name": "My Company SL",
"legal_address": "Llauder, 1",
"legal_city": "Barcelona",
"legal_zip": "08001",
"legal_state": "Barcelona",
"legal_country": "ES",
"representative_name": "John Doe",
"representative_email": "support@mycompany.com",
"representative_phone": "+34666999666"
}
'import requests
url = "https://{subdomain}.truust.io/2.0/accounts/verify"
payload = {
"type": "LEGAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "123456789",
"legal_name": "My Company SL",
"legal_address": "Llauder, 1",
"legal_city": "Barcelona",
"legal_zip": "08001",
"legal_state": "Barcelona",
"legal_country": "ES",
"representative_name": "John Doe",
"representative_email": "support@mycompany.com",
"representative_phone": "+34666999666"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'LEGAL',
first_name: 'John',
last_name: 'Doe',
vat_id: '123456789',
legal_name: 'My Company SL',
legal_address: 'Llauder, 1',
legal_city: 'Barcelona',
legal_zip: '08001',
legal_state: 'Barcelona',
legal_country: 'ES',
representative_name: 'John Doe',
representative_email: 'support@mycompany.com',
representative_phone: '+34666999666'
})
};
fetch('https://{subdomain}.truust.io/2.0/accounts/verify', 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/accounts/verify",
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([
'type' => 'LEGAL',
'first_name' => 'John',
'last_name' => 'Doe',
'vat_id' => '123456789',
'legal_name' => 'My Company SL',
'legal_address' => 'Llauder, 1',
'legal_city' => 'Barcelona',
'legal_zip' => '08001',
'legal_state' => 'Barcelona',
'legal_country' => 'ES',
'representative_name' => 'John Doe',
'representative_email' => 'support@mycompany.com',
'representative_phone' => '+34666999666'
]),
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/accounts/verify"
payload := strings.NewReader("{\n \"type\": \"LEGAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"123456789\",\n \"legal_name\": \"My Company SL\",\n \"legal_address\": \"Llauder, 1\",\n \"legal_city\": \"Barcelona\",\n \"legal_zip\": \"08001\",\n \"legal_state\": \"Barcelona\",\n \"legal_country\": \"ES\",\n \"representative_name\": \"John Doe\",\n \"representative_email\": \"support@mycompany.com\",\n \"representative_phone\": \"+34666999666\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{subdomain}.truust.io/2.0/accounts/verify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"LEGAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"123456789\",\n \"legal_name\": \"My Company SL\",\n \"legal_address\": \"Llauder, 1\",\n \"legal_city\": \"Barcelona\",\n \"legal_zip\": \"08001\",\n \"legal_state\": \"Barcelona\",\n \"legal_country\": \"ES\",\n \"representative_name\": \"John Doe\",\n \"representative_email\": \"support@mycompany.com\",\n \"representative_phone\": \"+34666999666\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/accounts/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"LEGAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"123456789\",\n \"legal_name\": \"My Company SL\",\n \"legal_address\": \"Llauder, 1\",\n \"legal_city\": \"Barcelona\",\n \"legal_zip\": \"08001\",\n \"legal_state\": \"Barcelona\",\n \"legal_country\": \"ES\",\n \"representative_name\": \"John Doe\",\n \"representative_email\": \"support@mycompany.com\",\n \"representative_phone\": \"+34666999666\"\n}"
response = http.request(request)
puts response.read_body{
"self": "/2.0/accounts/me",
"merchant_id": "<string>",
"name": "My Company",
"email": "jsmith@example.com",
"currency": "EUR",
"country_code": "ES",
"business_url": "<string>",
"business_phone": "<string>",
"business_description": "<string>",
"image_url": "<string>",
"public_key": "<string>",
"secret_key": "<string>",
"allow_shipping": 0,
"value_shipping": 123,
"is_active": true,
"psd2_enabled": 0,
"allowed_gateways": [
"<string>"
],
"gateways": [
{}
],
"default_gateway": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Account
Verify Account
Submits KYC (Know Your Customer) information for the authenticated account.
Use NATURAL for individuals and LEGAL for companies.
For LEGAL type, representative information is required.
POST
/
accounts
/
verify
Verify account
curl --request POST \
--url https://{subdomain}.truust.io/2.0/accounts/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "LEGAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "123456789",
"legal_name": "My Company SL",
"legal_address": "Llauder, 1",
"legal_city": "Barcelona",
"legal_zip": "08001",
"legal_state": "Barcelona",
"legal_country": "ES",
"representative_name": "John Doe",
"representative_email": "support@mycompany.com",
"representative_phone": "+34666999666"
}
'import requests
url = "https://{subdomain}.truust.io/2.0/accounts/verify"
payload = {
"type": "LEGAL",
"first_name": "John",
"last_name": "Doe",
"vat_id": "123456789",
"legal_name": "My Company SL",
"legal_address": "Llauder, 1",
"legal_city": "Barcelona",
"legal_zip": "08001",
"legal_state": "Barcelona",
"legal_country": "ES",
"representative_name": "John Doe",
"representative_email": "support@mycompany.com",
"representative_phone": "+34666999666"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'LEGAL',
first_name: 'John',
last_name: 'Doe',
vat_id: '123456789',
legal_name: 'My Company SL',
legal_address: 'Llauder, 1',
legal_city: 'Barcelona',
legal_zip: '08001',
legal_state: 'Barcelona',
legal_country: 'ES',
representative_name: 'John Doe',
representative_email: 'support@mycompany.com',
representative_phone: '+34666999666'
})
};
fetch('https://{subdomain}.truust.io/2.0/accounts/verify', 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/accounts/verify",
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([
'type' => 'LEGAL',
'first_name' => 'John',
'last_name' => 'Doe',
'vat_id' => '123456789',
'legal_name' => 'My Company SL',
'legal_address' => 'Llauder, 1',
'legal_city' => 'Barcelona',
'legal_zip' => '08001',
'legal_state' => 'Barcelona',
'legal_country' => 'ES',
'representative_name' => 'John Doe',
'representative_email' => 'support@mycompany.com',
'representative_phone' => '+34666999666'
]),
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/accounts/verify"
payload := strings.NewReader("{\n \"type\": \"LEGAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"123456789\",\n \"legal_name\": \"My Company SL\",\n \"legal_address\": \"Llauder, 1\",\n \"legal_city\": \"Barcelona\",\n \"legal_zip\": \"08001\",\n \"legal_state\": \"Barcelona\",\n \"legal_country\": \"ES\",\n \"representative_name\": \"John Doe\",\n \"representative_email\": \"support@mycompany.com\",\n \"representative_phone\": \"+34666999666\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{subdomain}.truust.io/2.0/accounts/verify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"LEGAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"123456789\",\n \"legal_name\": \"My Company SL\",\n \"legal_address\": \"Llauder, 1\",\n \"legal_city\": \"Barcelona\",\n \"legal_zip\": \"08001\",\n \"legal_state\": \"Barcelona\",\n \"legal_country\": \"ES\",\n \"representative_name\": \"John Doe\",\n \"representative_email\": \"support@mycompany.com\",\n \"representative_phone\": \"+34666999666\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.truust.io/2.0/accounts/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"LEGAL\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"vat_id\": \"123456789\",\n \"legal_name\": \"My Company SL\",\n \"legal_address\": \"Llauder, 1\",\n \"legal_city\": \"Barcelona\",\n \"legal_zip\": \"08001\",\n \"legal_state\": \"Barcelona\",\n \"legal_country\": \"ES\",\n \"representative_name\": \"John Doe\",\n \"representative_email\": \"support@mycompany.com\",\n \"representative_phone\": \"+34666999666\"\n}"
response = http.request(request)
puts response.read_body{
"self": "/2.0/accounts/me",
"merchant_id": "<string>",
"name": "My Company",
"email": "jsmith@example.com",
"currency": "EUR",
"country_code": "ES",
"business_url": "<string>",
"business_phone": "<string>",
"business_description": "<string>",
"image_url": "<string>",
"public_key": "<string>",
"secret_key": "<string>",
"allow_shipping": 0,
"value_shipping": 123,
"is_active": true,
"psd2_enabled": 0,
"allowed_gateways": [
"<string>"
],
"gateways": [
{}
],
"default_gateway": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
]
}
}Body
application/json
Response
Account verification submitted
