Skip to main content
POST
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
kyc
/
ubodeclarations
<?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 = '199463368';

    $response = $api->UboDeclarations->Create($userId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
{
    "Id": "ubo_m_01JH7TS09VMCDVV7B39F4A2JAF",
    "UserId": "user_m_01JH2Z508798F23M9FB9T9Z2Y7",
    "CreationDate": 1736503492,
    "ProcessedDate": null,
    "Status": "CREATED",
    "Reason": null,
    "Message": null,
    "Ubos": []
}  
Read more about the UBO Declaration object →

Path parameters

UserId
string
required
The unique identifier of the user.

Responses

Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
UserId
string
The unique identifier of the user.
CreationDate
Unix timestamp
The date and time at which the object was created.
ProcessedDate
Unix timestamp
The date and time at which the UBO Declaration was processed by Mangopay’s team.
Status
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 the Reason and  Message fields.
Reason
string
The reason for which the UBO Declaration was REFUSED or considered as INCOMPLETE.
Message
string
Additional information about why the UBO Declaration was refused or marked as incomplete, provided by Mangopay’s team.
Ubos
array
The list of UBOs attached to the UBO Declaration.
{
    "Message": "You can not request validation for a declaration which has no ubo",
    "Type": "invalid_action",
    "Id": "96ee403c-1a23-46c9-8b2e-1e56c7e80325#1672326575",
    "Date": 1672326576.0,
    "errors": null
}  
{
    "Message": "You can not create a declaration because you already have a declaration in progress",
    "Type": "invalid_action",
    "Id": "5b9c158f-2a55-44c0-b14b-e3cf62a5f2c4#1672326207",
    "Date": 1672326208.0,
    "errors": null
}  
{
    "Message": "Cannot create an UBO for a LegalUser of type SOLETRADER",
    "Type": "invalid_action",
    "Id": "f2da32db-43cd-405b-b7c2-d50ab14f41d8#1672326440",
    "Date": 1672326441.0,
    "errors": null
}  
{
    "Message": "User belonging to category PAYER can't create UBO declarations",
    "Type": "invalid_action",
    "Id": "96ee403c-1a23-46c9-8b2e-1e56c7e80325#1672326575",
    "Date": 1672326576.0,
    "errors": null
}
{
    "Id": "ubo_m_01JH7TS09VMCDVV7B39F4A2JAF",
    "UserId": "user_m_01JH2Z508798F23M9FB9T9Z2Y7",
    "CreationDate": 1736503492,
    "ProcessedDate": null,
    "Status": "CREATED",
    "Reason": null,
    "Message": null,
    "Ubos": []
}  
<?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 = '199463368';

    $response = $api->UboDeclarations->Create($userId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}