<?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 = '146476890';
$response = $api->Users->GetBankAccounts($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r$e);
}
}
[
{
"OwnerAddress":{
"AddressLine1":"The Oasis",
"AddressLine2":"Rue des plantes",
"City":"Paris",
"Region":"Ile de Frog",
"PostalCode":"75010",
"Country":"FR"
},
"IBAN":"FR7630004000031234567890143",
"BIC":"CRLYFRPP",
"UserId":"142036728",
"OwnerName":"John Doe",
"Type":"IBAN",
"Id":"142036878",
"Tag":"Postman create a bank account",
"CreationDate":1654073079,
"Active":true
},
{
"OwnerAddress":{
"AddressLine1":"77 Street",
"AddressLine2":"Rue des plantes",
"City":"Paris",
"Region":"Ile de France",
"PostalCode":"75009",
"Country":"FR"
},
"AccountNumber":"11696419",
"ABA":"071000288",
"DepositAccountType":"CHECKING",
"UserId":"142036728",
"OwnerName":"John Doe",
"Type":"US",
"Id":"150294885",
"Tag":null,
"CreationDate":1661864955,
"Active":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 = '146476890';
$response = $api->Users->GetBankAccounts($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r$e);
}
}
[
{
"OwnerAddress":{
"AddressLine1":"The Oasis",
"AddressLine2":"Rue des plantes",
"City":"Paris",
"Region":"Ile de Frog",
"PostalCode":"75010",
"Country":"FR"
},
"IBAN":"FR7630004000031234567890143",
"BIC":"CRLYFRPP",
"UserId":"142036728",
"OwnerName":"John Doe",
"Type":"IBAN",
"Id":"142036878",
"Tag":"Postman create a bank account",
"CreationDate":1654073079,
"Active":true
},
{
"OwnerAddress":{
"AddressLine1":"77 Street",
"AddressLine2":"Rue des plantes",
"City":"Paris",
"Region":"Ile de France",
"PostalCode":"75009",
"Country":"FR"
},
"AccountNumber":"11696419",
"ABA":"071000288",
"DepositAccountType":"CHECKING",
"UserId":"142036728",
"OwnerName":"John Doe",
"Type":"US",
"Id":"150294885",
"Tag":null,
"CreationDate":1661864955,
"Active":true
}
]
Active is true) have been migrated to the new feature and their data is retrievable via the GET View a Recipient endpoint using the same BankAccountId. Read more about legacy bank account migration.1Default value: 1Indicates the index of the page for the pagination.1; max. value: 100Default value: 10Indicates the number of items returned for each page of the pagination.CreationDate:ASC, CreationDate:DESCIndicates the direction in which to sort the list.false if the bank account is closed or does not exist anymore.200
Type.Show properties
Show properties
Show properties
Country is US, CA, or MX.UserCategory of OWNER and the KYCLevel of REGULAR, then the OwnerName is set to the FirstName and LastName values for a Natural User or the Name value for a Legal User. In this case, the VirtualAccountPurpose in the API response is USER_OWNED.If the User is not KYC verified and an OWNER, then the OwnerName is set to “MGP PlatformTradingName” in standard cases, or else “Mangopay” for Marketplace Payment Extension (MPE) workflows. In this case, the VirtualAccountPurpose in the API response is COLLECTION.Caution: Your platform must ensure that you use the OwnerName returned in the API response.CHECKING, SAVINGSThe deposit type for US-type bank accounts.IBAN, US, CA, GB, OTHERThe type of the bank account, indicating the country where the real-life account is registeredIBAN – For accounts registered in countries that use IBAN US – For accounts registered in the United States CA – For accounts registered in CanadaGB – For accounts registered in the United KingdomOTHER – For accounts registered in countries that do not use IBAN (and are not US, CA, GB)false if the bank account is closed or does not exist anymore.[
{
"OwnerAddress":{
"AddressLine1":"The Oasis",
"AddressLine2":"Rue des plantes",
"City":"Paris",
"Region":"Ile de Frog",
"PostalCode":"75010",
"Country":"FR"
},
"IBAN":"FR7630004000031234567890143",
"BIC":"CRLYFRPP",
"UserId":"142036728",
"OwnerName":"John Doe",
"Type":"IBAN",
"Id":"142036878",
"Tag":"Postman create a bank account",
"CreationDate":1654073079,
"Active":true
},
{
"OwnerAddress":{
"AddressLine1":"77 Street",
"AddressLine2":"Rue des plantes",
"City":"Paris",
"Region":"Ile de France",
"PostalCode":"75009",
"Country":"FR"
},
"AccountNumber":"11696419",
"ABA":"071000288",
"DepositAccountType":"CHECKING",
"UserId":"142036728",
"OwnerName":"John Doe",
"Type":"US",
"Id":"150294885",
"Tag":null,
"CreationDate":1661864955,
"Active":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 = '146476890';
$response = $api->Users->GetBankAccounts($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r$e);
}
}
Was this page helpful?