GET
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
bankaccounts
/
{BankAccountId}
<?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';
    $bankAccountId = '194612216';

    $response = $api->Users->GetBankAccount($userId, $bankAccountId);

    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 France",
        "PostalCode":"75010",
        "Country":"FR"
    },
    "IBAN":"FR7630004000031234567890143",
    "BIC":"CRLYFRPP",
    "UserId":"user_m_01J18HZSACR1EMYNY1TBS8KTJD",
    "OwnerName":"Alex Smith",
    "Type":"IBAN",
    "Id":"bankacc_m_01J6A30MFXK50P8C8PCB73PM1B",
    "Tag":"Created using Mangopay API Postman Collection",
    "CreationDate":1654073079,
    "Active":true
}  

Caution – Replaced by Recipients feature

The Bank Account object and endpoints have been replaced by the Recipients feature, which all platforms should integrate instead.

Legacy active Bank Accounts (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.

Path parameters

BankAccountId
string
required

The unique identifier of the bank account.

Responses

{
    "OwnerAddress":{
        "AddressLine1":"The Oasis",
        "AddressLine2":"Rue des plantes",
        "City":"Paris",
        "Region":"Ile de France",
        "PostalCode":"75010",
        "Country":"FR"
    },
    "IBAN":"FR7630004000031234567890143",
    "BIC":"CRLYFRPP",
    "UserId":"user_m_01J18HZSACR1EMYNY1TBS8KTJD",
    "OwnerName":"Alex Smith",
    "Type":"IBAN",
    "Id":"bankacc_m_01J6A30MFXK50P8C8PCB73PM1B",
    "Tag":"Created using Mangopay API Postman Collection",
    "CreationDate":1654073079,
    "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';
    $bankAccountId = '194612216';

    $response = $api->Users->GetBankAccount($userId, $bankAccountId);

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