<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = '198557165';
$uboDeclarationId = '198692872';
$uboId = '198693429';
$response = $api->UboDeclarations->GetUbo($userId, $uboDeclarationId, $uboId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myUser = {
Id: '170853400',
}
let myUboDeclaration = {
Id: '180932134',
}
let myUbo = {
Id: '180945113',
}
const getUbo = async (userId, uboDeclarationId, uboId) => {
return await mangopay.UboDeclarations.getUbo(userId, uboDeclarationId, uboId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
getUbo(myUser.Id, myUboDeclaration.Id, myUbo.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewUbo(legalUserId, uboDeclarationId, uboId)
begin
response = MangoPay::Ubo.fetch(legalUserId, uboDeclarationId, uboId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch UBO: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myLegalUser = {
Id: '194338122'
}
myUboDeclaration = {
Id: '194511216'
}
myUbo = {
Id: '194511740'
}
viewUbo(myLegalUser[:Id], myUboDeclaration[:Id], myUbo[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.Ubo;
public class ViewUbo {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
String userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE";
String uboDeclarationId = "ubo_m_01HRYRKZN51BFXDWD6CCE22PHN";
String uboId = "ubo_m_01HRYTZJS07SP4GAMKYMB9YPCG";
Ubo viewUbo = mangopay.getUboDeclarationApi().getUbo(userId, uboDeclarationId, uboId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewUbo);
System.out.println(prettyJson);
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.resources import Ubo, UboDeclaration, LegalUser
legal_user = LegalUser(
id = '210602889'
)
user_ubo_declaration = UboDeclaration(
id = '210896999'
)
user_ubo = Ubo(
id = '210898223'
)
try:
view_ubo = Ubo.get(reference = user_ubo.id, user_id = legal_user.id, ubo_declaration_id = user_ubo_declaration.id)
pprint(vars(view_ubo))
except Ubo.DoesNotExist:
print('The UBO {} does not exist.'.format(user_ubo_declaration))
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0";
var uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74";
var uboId = "ubo_m_01J2VBGYNQY07HYJQHKAS00VF8";
var viewUbo = await api.UboDeclarations.GetUboAsync(userId, uboDeclarationId, uboId);
string prettyPrint = JsonConvert.SerializeObject(viewUbo, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "ubo_m_01JH7TS5ZHW3R501ACJEKD5G39",
"CreationDate": 1736503498,
"LastName": "Wiza",
"FirstName": "Jess",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "669 Ratke Forge",
"AddressLine2": "Schamberger Walk",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"Birthplace": {
"City": "Paris",
"Country": "FR"
},
"IsActive": true
}
UBO declarations
View a UBO
GET
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
kyc
/
ubodeclarations
/
{UboDeclarationId}
/
ubos
/
{UboId}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = '198557165';
$uboDeclarationId = '198692872';
$uboId = '198693429';
$response = $api->UboDeclarations->GetUbo($userId, $uboDeclarationId, $uboId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myUser = {
Id: '170853400',
}
let myUboDeclaration = {
Id: '180932134',
}
let myUbo = {
Id: '180945113',
}
const getUbo = async (userId, uboDeclarationId, uboId) => {
return await mangopay.UboDeclarations.getUbo(userId, uboDeclarationId, uboId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
getUbo(myUser.Id, myUboDeclaration.Id, myUbo.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewUbo(legalUserId, uboDeclarationId, uboId)
begin
response = MangoPay::Ubo.fetch(legalUserId, uboDeclarationId, uboId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch UBO: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myLegalUser = {
Id: '194338122'
}
myUboDeclaration = {
Id: '194511216'
}
myUbo = {
Id: '194511740'
}
viewUbo(myLegalUser[:Id], myUboDeclaration[:Id], myUbo[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.Ubo;
public class ViewUbo {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
String userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE";
String uboDeclarationId = "ubo_m_01HRYRKZN51BFXDWD6CCE22PHN";
String uboId = "ubo_m_01HRYTZJS07SP4GAMKYMB9YPCG";
Ubo viewUbo = mangopay.getUboDeclarationApi().getUbo(userId, uboDeclarationId, uboId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewUbo);
System.out.println(prettyJson);
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.resources import Ubo, UboDeclaration, LegalUser
legal_user = LegalUser(
id = '210602889'
)
user_ubo_declaration = UboDeclaration(
id = '210896999'
)
user_ubo = Ubo(
id = '210898223'
)
try:
view_ubo = Ubo.get(reference = user_ubo.id, user_id = legal_user.id, ubo_declaration_id = user_ubo_declaration.id)
pprint(vars(view_ubo))
except Ubo.DoesNotExist:
print('The UBO {} does not exist.'.format(user_ubo_declaration))
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0";
var uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74";
var uboId = "ubo_m_01J2VBGYNQY07HYJQHKAS00VF8";
var viewUbo = await api.UboDeclarations.GetUboAsync(userId, uboDeclarationId, uboId);
string prettyPrint = JsonConvert.SerializeObject(viewUbo, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "ubo_m_01JH7TS5ZHW3R501ACJEKD5G39",
"CreationDate": 1736503498,
"LastName": "Wiza",
"FirstName": "Jess",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "669 Ratke Forge",
"AddressLine2": "Schamberger Walk",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"Birthplace": {
"City": "Paris",
"Country": "FR"
},
"IsActive": true
}
Caution – Legacy endpoints being superseded by the hosted KYC/KYB solutionMangopay’s hosted KYC/KYB solution is becoming mandatory for all platforms, and allows Legal Users to declare and verify all beneficial owners in the same IDV Session object.The criteria defining beneficial owners remain the same.
Path parameters
string
required
The unique identifier of the user.
string
required
The unique identifier of the UBO Declaration.
string
required
The unique identifier of the UBO.
Responses
200
200
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Unix timestamp
The date and time at which the object was created.
string
Max. length: 100 charactersThe last name of the beneficial owner.
string
Max. length: 100 charactersThe first name of the beneficial owner.
Unix timestamp
The date of birth of the beneficial owner.Note: This is a Unix timestamp in UTC. Ensure you convert your timezone to UTC to avoid midnight being interpreted as the day before.
string
The nationality of the beneficial owner.
object
The postal address of the beneficial owner.
Show properties
Show properties
string
Max. length: 255 charactersThe first line of the address.
string
Max. length: 255 charactersThe second line of the address.
string
Max. length: 255 charactersThe city of the address.
string
Max. length: 255 charactersThe region of the address. This field is optional except if the
Country is US, CA, or MX.string
Max. length: 255 charactersThe postal code of the address. The postal code can contain the following characters: alphanumeric, dashes, and spaces.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object
Information about the beneficial owner’s place of birth.
Show properties
Show properties
string
The city in which the beneficial owner was born.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country in which the beneficial owner was born.
boolean
Whether or not the UBO is considered in the declaration. To disregard a UBO, this parameter must be set to
false. This action is irreversible.{
"Id": "ubo_m_01JH7TS5ZHW3R501ACJEKD5G39",
"CreationDate": 1736503498,
"LastName": "Wiza",
"FirstName": "Jess",
"Birthday": 652117514,
"Nationality": "FR",
"Address": {
"AddressLine1": "669 Ratke Forge",
"AddressLine2": "Schamberger Walk",
"City": "Paris",
"Region": "Île-de-France",
"PostalCode": "75001",
"Country": "FR"
},
"Birthplace": {
"City": "Paris",
"Country": "FR"
},
"IsActive": true
}
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$userId = '198557165';
$uboDeclarationId = '198692872';
$uboId = '198693429';
$response = $api->UboDeclarations->GetUbo($userId, $uboDeclarationId, $uboId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myUser = {
Id: '170853400',
}
let myUboDeclaration = {
Id: '180932134',
}
let myUbo = {
Id: '180945113',
}
const getUbo = async (userId, uboDeclarationId, uboId) => {
return await mangopay.UboDeclarations.getUbo(userId, uboDeclarationId, uboId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
getUbo(myUser.Id, myUboDeclaration.Id, myUbo.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def viewUbo(legalUserId, uboDeclarationId, uboId)
begin
response = MangoPay::Ubo.fetch(legalUserId, uboDeclarationId, uboId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch UBO: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myLegalUser = {
Id: '194338122'
}
myUboDeclaration = {
Id: '194511216'
}
myUbo = {
Id: '194511740'
}
viewUbo(myLegalUser[:Id], myUboDeclaration[:Id], myUbo[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.Ubo;
public class ViewUbo {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
String userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE";
String uboDeclarationId = "ubo_m_01HRYRKZN51BFXDWD6CCE22PHN";
String uboId = "ubo_m_01HRYTZJS07SP4GAMKYMB9YPCG";
Ubo viewUbo = mangopay.getUboDeclarationApi().getUbo(userId, uboDeclarationId, uboId);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewUbo);
System.out.println(prettyJson);
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.resources import Ubo, UboDeclaration, LegalUser
legal_user = LegalUser(
id = '210602889'
)
user_ubo_declaration = UboDeclaration(
id = '210896999'
)
user_ubo = Ubo(
id = '210898223'
)
try:
view_ubo = Ubo.get(reference = user_ubo.id, user_id = legal_user.id, ubo_declaration_id = user_ubo_declaration.id)
pprint(vars(view_ubo))
except Ubo.DoesNotExist:
print('The UBO {} does not exist.'.format(user_ubo_declaration))
using MangoPay.SDK;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var userId = "user_m_01J2V0P9B1WCX46GEBDWCTXNQ0";
var uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74";
var uboId = "ubo_m_01J2VBGYNQY07HYJQHKAS00VF8";
var viewUbo = await api.UboDeclarations.GetUboAsync(userId, uboDeclarationId, uboId);
string prettyPrint = JsonConvert.SerializeObject(viewUbo, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I