<?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);
}
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let user = {
Id: '165863393',
}
const listUserBankAccounts = async (userId) => {
return await mangopay.Users.getBankAccounts(userId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listUserBankAccounts(user.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 listBankAccounts(userId)
begin
response = MangoPay::BankAccount.fetch(userId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch bank account: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: '165863393'
}
listBankAccounts(myUser[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.BankAccount;
import java.util.List;
public class ListUserBankAccounts {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X";
List<BankAccount> bankAccounts = mangopay.getUserApi().getBankAccounts(userId, null, null);
for (BankAccount bankAccount : bankAccounts) {
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(bankAccount);
System.out.println(prettyJson);
}
}
}
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 NaturalUser
natural_user = NaturalUser.get('213753890')
bank_accounts = natural_user.bankaccounts.all()
for bank_account in bank_accounts:
pprint(vars(bank_account))
using MangoPay.SDK;
using MangoPay.SDK.Entities;
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_01J2TZ261WZNDM0ZDRWGDYA4GN";
var bankAccounts = await api.Users.GetBankAccountsAsync(userId, new Pagination(1, 100), null);
string prettyPrint = JsonConvert.SerializeObject(bankAccounts, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"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
}
]
Bank accounts
List Bank Accounts for a User
GET
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
bankaccounts
<?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);
}
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let user = {
Id: '165863393',
}
const listUserBankAccounts = async (userId) => {
return await mangopay.Users.getBankAccounts(userId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listUserBankAccounts(user.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 listBankAccounts(userId)
begin
response = MangoPay::BankAccount.fetch(userId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch bank account: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: '165863393'
}
listBankAccounts(myUser[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.BankAccount;
import java.util.List;
public class ListUserBankAccounts {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X";
List<BankAccount> bankAccounts = mangopay.getUserApi().getBankAccounts(userId, null, null);
for (BankAccount bankAccount : bankAccounts) {
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(bankAccount);
System.out.println(prettyJson);
}
}
}
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 NaturalUser
natural_user = NaturalUser.get('213753890')
bank_accounts = natural_user.bankaccounts.all()
for bank_account in bank_accounts:
pprint(vars(bank_account))
using MangoPay.SDK;
using MangoPay.SDK.Entities;
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_01J2TZ261WZNDM0ZDRWGDYA4GN";
var bankAccounts = await api.Users.GetBankAccountsAsync(userId, new Pagination(1, 100), null);
string prettyPrint = JsonConvert.SerializeObject(bankAccounts, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"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
}
]
Note – Replaced by Recipients featureThe 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.Query parameters
integer
Start value:
1Default value: 1Indicates the index of the page for the pagination.integer
Min. value:
1; max. value: 100Default value: 10Indicates the number of items returned for each page of the pagination.string
Possible values:
CreationDate:ASC, CreationDate:DESCDefault value: CreationDate:ASCIndicates the direction in which to sort the list.boolean
required
Whether or not the Bank Account is active.
Mangopay automatically sets this parameter to
false if the bank account is closed or does not exist anymore.Path parameters
string
required
The unique identifier of the User (natural or legal) who owns the bank account.
Responses
200
200
array
The list of Bank Accounts objects created by the platform. Returned parameters can vary depending on the bank account
Type.Show properties
Show properties
object
The Bank Account object created by the platform.
Show properties
Show properties
object
Information about the address of residence of the bank account 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.
string
Max. length: 255 charactersThe owner of the banking alias, which is set automatically by Mangopay since September 15, 2025 (read more).If the User owning the attached wallet has
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.string
Max. length: 255 charactersCustom data that you can add to this object.
string
The IBAN (international bank account number) for the bank account.
string
Format: Digits onlyThe unique set of digits of the bank account.
string
The BIC (international identifier of the bank) for IBAN or OTHER-type bank accounts.The BIC can have one of the two following formats:
- BIC8 – 8-character BIC (AAAABBCC)
- BIC11 – 11-character BIC (AAAABBCCDDD)
- AAAA represents the bank code: 4 characters defining the bank
- BB represents the country code: 2 characters forming the country ISO code (ISO 3166 format)
- CC represents the location code: 2 localization characters (alphabetical or numeric) to distinguish banks from the same country
- DDD represents the branch code: 3 characters used to define the branch of the bank (sometimes replaced with XXX)
string
Length: 9 charactersThe American Banking Association (ABA) routing number for US-type bank accounts.
string
Returned values:
CHECKING, SAVINGSThe deposit type for US-type bank accounts.string
Length: 3 digitsThe 3-digit number assigned to Canadian financial institutions, for CA-type bank accounts.
string
Length: 5 digitsThe 5-digit number assigned to branches of Canadian financial institutions, for CA-type bank accounts.
string
Max. length: 50 characters (letters and digits only)The name of the Canadian bank for CA-type bank accounts.
string
The 6-digit sort code, assigned to UK financial institutions, for GB-type bank accounts.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country in which the bank account is registered.
string
The unique identifier of the User (natural or legal) who owns the bank account.
string
Returned values:
The values are:
IBAN, US, CA, GB, OTHERThe type of the bank account, indicating the country where the real-life account is registeredThe values are:
IBAN– For accounts registered in countries that use IBANUS– For accounts registered in the United StatesCA– 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)
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.
boolean
Whether or not the Bank Account is active.
Mangopay automatically sets this parameter to
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);
}
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let user = {
Id: '165863393',
}
const listUserBankAccounts = async (userId) => {
return await mangopay.Users.getBankAccounts(userId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listUserBankAccounts(user.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 listBankAccounts(userId)
begin
response = MangoPay::BankAccount.fetch(userId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch bank account: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: '165863393'
}
listBankAccounts(myUser[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.BankAccount;
import java.util.List;
public class ListUserBankAccounts {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var userId = "user_m_01J29D5XMKKNPX72AR5HRV804X";
List<BankAccount> bankAccounts = mangopay.getUserApi().getBankAccounts(userId, null, null);
for (BankAccount bankAccount : bankAccounts) {
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(bankAccount);
System.out.println(prettyJson);
}
}
}
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 NaturalUser
natural_user = NaturalUser.get('213753890')
bank_accounts = natural_user.bankaccounts.all()
for bank_account in bank_accounts:
pprint(vars(bank_account))
using MangoPay.SDK;
using MangoPay.SDK.Entities;
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_01J2TZ261WZNDM0ZDRWGDYA4GN";
var bankAccounts = await api.Users.GetBankAccountsAsync(userId, new Pagination(1, 100), null);
string prettyPrint = JsonConvert.SerializeObject(bankAccounts, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I