<?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';
$response = $api->UboDeclarations->Get($userId, $uboDeclarationId);
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',
}
const getUboDeclaration = async (userId, uboDeclarationId) => {
return await mangopay.UboDeclarations.get(userId, uboDeclarationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
getUboDeclaration(myUser.Id, myUboDeclaration.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 viewUboDeclaration(legalUserId, uboDeclarationId)
begin
response = MangoPay::UboDeclaration.fetch(legalUserId, uboDeclarationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update UBO: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myLegalUser = {
Id: '194338122'
}
myUboDeclaration = {
Id: '194511216'
}
viewUboDeclaration(myLegalUser[:Id], myUboDeclaration[:Id])
import com.mangopay.MangoPayApi;
import com.mangopay.entities.UboDeclaration;
import java.lang.reflect.Field;
public class ViewUboDeclaration {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
UboDeclaration uboDeclaration = mangopay.getUboDeclarationApi().get("ubo_m_01HRYRKZN51BFXDWD6CCE22PHN");
System.out.println(String.format("id: %s", uboDeclaration.getId()));
printObjectFields(uboDeclaration);
}
private static void printObjectFields(Object obj) {
Class<?> objClass = obj.getClass();
Field[] fields = objClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
Object value = field.get(obj);
System.out.println(field.getName() + ": " + value);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import UboDeclaration, LegalUser
ubo_declaration = UboDeclaration(
id = '210896999'
)
legal_user = LegalUser(
id = '210602889'
)
try:
view_ubo_declaration = UboDeclaration.get(reference = ubo_declaration.id, user_id = legal_user.id)
pprint(vars(view_ubo_declaration))
except UboDeclaration.DoesNotExist:
print('The UBO declaration {} does not exist for User n.{}'.format(ubo_declaration, legal_user.id))
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 uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74";
var viewUboDeclaration = await api.UboDeclarations.GetUboDeclarationByIdAsync(uboDeclarationId);
string prettyPrint = JsonConvert.SerializeObject(viewUboDeclaration, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "158947737",
"UserId": "158947634",
"CreationDate": 1672153298,
"ProcessedDate": null,
"Status": "CREATED",
"Reason": null,
"Message": null,
"Ubos": [
{
"Id": "158947898",
"CreationDate": 1672153693,
"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 Declaration
GET
/
v2.01
/
{ClientId}
/
kyc
/
ubodeclarations
/
{UboDeclarationId}
<?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';
$response = $api->UboDeclarations->Get($userId, $uboDeclarationId);
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',
}
const getUboDeclaration = async (userId, uboDeclarationId) => {
return await mangopay.UboDeclarations.get(userId, uboDeclarationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
getUboDeclaration(myUser.Id, myUboDeclaration.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 viewUboDeclaration(legalUserId, uboDeclarationId)
begin
response = MangoPay::UboDeclaration.fetch(legalUserId, uboDeclarationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update UBO: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myLegalUser = {
Id: '194338122'
}
myUboDeclaration = {
Id: '194511216'
}
viewUboDeclaration(myLegalUser[:Id], myUboDeclaration[:Id])
import com.mangopay.MangoPayApi;
import com.mangopay.entities.UboDeclaration;
import java.lang.reflect.Field;
public class ViewUboDeclaration {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
UboDeclaration uboDeclaration = mangopay.getUboDeclarationApi().get("ubo_m_01HRYRKZN51BFXDWD6CCE22PHN");
System.out.println(String.format("id: %s", uboDeclaration.getId()));
printObjectFields(uboDeclaration);
}
private static void printObjectFields(Object obj) {
Class<?> objClass = obj.getClass();
Field[] fields = objClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
Object value = field.get(obj);
System.out.println(field.getName() + ": " + value);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import UboDeclaration, LegalUser
ubo_declaration = UboDeclaration(
id = '210896999'
)
legal_user = LegalUser(
id = '210602889'
)
try:
view_ubo_declaration = UboDeclaration.get(reference = ubo_declaration.id, user_id = legal_user.id)
pprint(vars(view_ubo_declaration))
except UboDeclaration.DoesNotExist:
print('The UBO declaration {} does not exist for User n.{}'.format(ubo_declaration, legal_user.id))
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 uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74";
var viewUboDeclaration = await api.UboDeclarations.GetUboDeclarationByIdAsync(uboDeclarationId);
string prettyPrint = JsonConvert.SerializeObject(viewUboDeclaration, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "158947737",
"UserId": "158947634",
"CreationDate": 1672153298,
"ProcessedDate": null,
"Status": "CREATED",
"Reason": null,
"Message": null,
"Ubos": [
{
"Id": "158947898",
"CreationDate": 1672153693,
"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 UBO Declaration.
Responses
200
200
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
The unique identifier of the user.
Unix timestamp
The date and time at which the object was created.
Unix timestamp
The date and time at which the UBO Declaration was processed by Mangopay’s team.
string
Returned values:
CREATED, VALIDATION_ASKED, INCOMPLETE, VALIDATED, REFUSEDThe status of the declaration:CREATED– The UBO Declaration is created, but not submitted yet.VALIDATION_ASKED– The UBO Declaration is submitted for validation.INCOMPLETE– The UBO Declaration is deemed incomplete by Mangopay teams.VALIDATED– The UBO Declaration is validated by Mangopay’s team.REFUSED– The UBO Declaration is rejected by Mangopay’s team. You can learn more about the reasons for refusal in theReasonandMessagefields.
string
The reason for which the UBO Declaration was
REFUSED or considered as INCOMPLETE.string
Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team.
array
The list of UBOs attached to the UBO Declaration.
Hide properties
Hide properties
object
The UBO object created by the platform.
Hide properties
Hide properties
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
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": "158947737",
"UserId": "158947634",
"CreationDate": 1672153298,
"ProcessedDate": null,
"Status": "CREATED",
"Reason": null,
"Message": null,
"Ubos": [
{
"Id": "158947898",
"CreationDate": 1672153693,
"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';
$response = $api->UboDeclarations->Get($userId, $uboDeclarationId);
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',
}
const getUboDeclaration = async (userId, uboDeclarationId) => {
return await mangopay.UboDeclarations.get(userId, uboDeclarationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
getUboDeclaration(myUser.Id, myUboDeclaration.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 viewUboDeclaration(legalUserId, uboDeclarationId)
begin
response = MangoPay::UboDeclaration.fetch(legalUserId, uboDeclarationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update UBO: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myLegalUser = {
Id: '194338122'
}
myUboDeclaration = {
Id: '194511216'
}
viewUboDeclaration(myLegalUser[:Id], myUboDeclaration[:Id])
import com.mangopay.MangoPayApi;
import com.mangopay.entities.UboDeclaration;
import java.lang.reflect.Field;
public class ViewUboDeclaration {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
UboDeclaration uboDeclaration = mangopay.getUboDeclarationApi().get("ubo_m_01HRYRKZN51BFXDWD6CCE22PHN");
System.out.println(String.format("id: %s", uboDeclaration.getId()));
printObjectFields(uboDeclaration);
}
private static void printObjectFields(Object obj) {
Class<?> objClass = obj.getClass();
Field[] fields = objClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
Object value = field.get(obj);
System.out.println(field.getName() + ": " + value);
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import UboDeclaration, LegalUser
ubo_declaration = UboDeclaration(
id = '210896999'
)
legal_user = LegalUser(
id = '210602889'
)
try:
view_ubo_declaration = UboDeclaration.get(reference = ubo_declaration.id, user_id = legal_user.id)
pprint(vars(view_ubo_declaration))
except UboDeclaration.DoesNotExist:
print('The UBO declaration {} does not exist for User n.{}'.format(ubo_declaration, legal_user.id))
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 uboDeclarationId = "ubo_m_01J2V64AD2C8G7PYACCP16ZS74";
var viewUboDeclaration = await api.UboDeclarations.GetUboDeclarationByIdAsync(uboDeclarationId);
string prettyPrint = JsonConvert.SerializeObject(viewUboDeclaration, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I