Skip to main content
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>",
  "value_shipping": 123,
  "is_active": true,
  "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."
]
}
}

Authorizations

Authorization
string
header
required

Use your account's Secret Key as the Bearer token.

Body

application/json
type
enum<string>
required

Verification type: NATURAL for individuals, SOLETRADER for self-employed, LEGAL for companies.

Available options:
NATURAL,
SOLETRADER,
LEGAL
first_name
string
required

First name of the account holder or representative.

Maximum string length: 255
last_name
string
required

Last name of the account holder or representative.

Maximum string length: 255
vat_id
string
required

Tax identification number (DNI, NIF, CIF, etc.).

Maximum string length: 255

Legal registered address.

Maximum string length: 255
Maximum string length: 255
Maximum string length: 255
Maximum string length: 255

Company legal name. Required for LEGAL type.

Maximum string length: 255

ISO 3166-1 alpha-2 country code.

Maximum string length: 2
birthday
string<date>

Date of birth. Applicable for NATURAL type.

occupation
string

Title or short description of occupation. Applicable for NATURAL type.

Maximum string length: 255
income_range
number

Income range value. Applicable for NATURAL type.

representative_name
string

Full name of the company representative. Required for LEGAL type.

Maximum string length: 255
representative_email
string<email>

Email of the company representative. Required for LEGAL type.

representative_phone
string

Phone of the company representative. Required for LEGAL type.

Response

Account verification submitted

self
string
Example:

"/2.0/accounts/me"

merchant_id
string

Unique merchant identifier (addon_key).

name
string
Example:

"My Company"

email
string<email>
currency
string
Example:

"EUR"

country_code
string
Example:

"ES"

business_url
string | null
business_phone
string | null
business_description
string | null
image_url
string | null
public_key
string
secret_key
string

Secret API key. Only visible to the account owner.

allow_shipping
enum<integer>
Available options:
0,
1
value_shipping
number
is_active
boolean
psd2_enabled
enum<integer>
Available options:
0,
1
allowed_gateways
string[]
gateways
object[] | null

List of configured payment gateway objects for the account.

default_gateway
string | null
created_at
string<date-time> | null