// GET has no body parameters
<?php
require_once "../vendor/autoload.php";
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Pagination;
use MangoPay\Sorting;
use MangoPay\SortDirection;
$api = new MangoPayApi();
$api->Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
$api->Config->DebugMode = false;
try {
$walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
$list = $api->VirtualAccounts->GetAll($walletId);
print_r($list);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk');
const mangopay = new mangopayInstance({
clientId: 'client-id',
clientApiKey: 'api-key',
})
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
const listWalletVirtualAccounts = async (walletId) => {
return await mangopay.VirtualAccounts.getAll(walletId)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
listWalletVirtualAccounts(myWallet.Id)
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def listWalletVirtualAccounts(walletId)
begin
response = MangoPay::VirtualAccount.fetch_all(walletId)
puts response
return response
end
end
pp(listWalletVirtualAccounts(myWallet[:Id]))
[
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "ACTIVE",
"Active": true,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "21762697"
}
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"Iban": "GB62SAPY60838221762697",
"Bic": "SAPYGB2L"
}
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
Virtual IBAN
List Virtual Accounts for a Wallet
GET
/
v2.01
/
{ClientId}
/
wallets
/
{WalletId}
/
virtual-accounts
// GET has no body parameters
<?php
require_once "../vendor/autoload.php";
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Pagination;
use MangoPay\Sorting;
use MangoPay\SortDirection;
$api = new MangoPayApi();
$api->Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
$api->Config->DebugMode = false;
try {
$walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
$list = $api->VirtualAccounts->GetAll($walletId);
print_r($list);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk');
const mangopay = new mangopayInstance({
clientId: 'client-id',
clientApiKey: 'api-key',
})
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
const listWalletVirtualAccounts = async (walletId) => {
return await mangopay.VirtualAccounts.getAll(walletId)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
listWalletVirtualAccounts(myWallet.Id)
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def listWalletVirtualAccounts(walletId)
begin
response = MangoPay::VirtualAccount.fetch_all(walletId)
puts response
return response
end
end
pp(listWalletVirtualAccounts(myWallet[:Id]))
[
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "ACTIVE",
"Active": true,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "21762697"
}
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"Iban": "GB62SAPY60838221762697",
"Bic": "SAPYGB2L"
}
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
Path parameters
string
required
The unique identifier of the wallet.
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.Responses
200
200
array
The list of virtual accounts created by the platform.
Show properties
Show properties
object
The Virtual Account object created by the platform
Show properties
Show properties
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Max. length: 255 charactersCustom data that you can add to this object.
Unix timestamp
The date and time at which the object was created.
string
The unique identifier of the wallet.
string
Returned values:
COLLECTION, USER_OWNEDThe type of the virtual account:COLLECTION- Owned by Mangopay and usable by platforms and/or users for the purpose of collecting and reconciling incoming funds paid by users.USER_OWNED- Owned by the wallet owner, enabling them to accept and store funds and make payments. Offering User-Owned Accounts requires your platform to sign the VOP contract amendment.
string
Returned values: The two-letter ISO 3166-1 country code (LU, FR, GB, etc.) of an available country (depends on contract and activation settings).The country of the IBAN. The country must correspond to the currency of the wallet. See the virtual account guide for details.
string
The status of the Virtual Account:
PENDING– The account creation request is being processed and full account details may not yet be returned. Any funds sent to the account are returned (if account details exist).PENDINGcan transition toACTIVEorFAILED.ACTIVE– The account is active and can receive funds (see note about delayed UK CoP recognition forGBaccounts).ACTIVEcan transition toBLOCKEDorCLOSED.BLOCKED– The account is blocked and is not active. Any funds sent to the account are returned. This temporary status may be used during processes relating to user verification or fraud screening.BLOCKEDcan transition toACTIVEorCLOSED.CLOSED– The account has been deactivated and is closed. Any funds sent to the account are returned. This is a final state.FAILED– The account creation request failed or was rejected. This final state is rare. Any funds sent to the account are returned (if account details exist).
boolean
Whether or not the Virtual Account is active.
string
The owner of the virtual account.The account owner is assigned automatically depending on the
VirtualAccountPurpose:COLLECTION– Owned by Mangopay SA or Mangopay UK Ltd., mentioning the platform’s trading name in the format “MGPPlatformTradingName”USER_OWNED– Owned by the owner of the associated wallet:FirstNameLastNamefor Natural Users;Namefor Legal Users
object
The account details in local format, populated if
Capabilities.LocalPayinAvailable is true.Caution: Retrieve both the fields and values of these child objects dynamically to present to the user. The LocalAccountDetails.Account object has different properties depending on the virtual account Country, and these may change over time as Mangopay’s coverage expands.Show child attributes
Show child attributes
object
The address associated with the account.
Show child attributes
Show child attributes
string
Max. length: 255 charactersThe building number and street name of the address.
string
Max. length: 50 charactersThe postal code of the address.
string
Max. length: 255 charactersThe town or city of the address.
string
Max. length: 255 charactersThe region, state, or county of the address.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object | null
Details of the account in local account identifier format.The properties of this object differ depending on the Virtual Account
Country:- IBAN – Format if
CountryisDE,ES,FR,LU - DK – Format if
CountryisDK - GB – Format if
CountryisGB - US – Format if
CountryisUS - CA – Format if
CountryisCA - AU – Format if
CountryisAU - LI – Format if
CountryisLI
Account object’s properties and values dynamically.- IBAN
- DK
- GB
- US
- CA
- AU
- LI
string | null
The name of the bank.
array (object)
List of the account details in international format, populated if
Capabilities.InternationalPayinAvailable is true.Best practice: Retrieve both the fields and values of these child objects dynamically to present to the user. The InternationalAccountDetails.Account object may be null depending on the virtual account Country.Show child attributes
Show child attributes
object
The address associated with the account.
Show child attributes
Show child attributes
string
Max. length: 255 charactersThe building number and street name of the address.
string
Max. length: 50 charactersThe postal code of the address.
string
Max. length: 255 charactersThe town or city of the address.
string
Max. length: 255 charactersThe region, state, or county of the address.
string
Format: Two-letter country code (ISO 3166-1 alpha-2 format)The country of the address.
object | null
Details of the account in international format.Returned
null if Country is US, CA, or AU as Capabilities.InternationalPayinAvailable is false for these countries.string | null
The name of the bank.
object
Information about the account’s payment capabilities.
Show child attributes
Show child attributes
boolean
Whether or not local bank wires can be made to this account.
boolean
Whether or not international bank wires can be made to this account.Returned
false if Country is US or CA.string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
string
The explanation of the result code.
ResultCode) are possible on a 200 response. Read more →
[
{
"Id": "wltbank_m_01J7NCAT73Q15SVSM9S6Z36GRZ",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1726220691,
"WalletId": "wlt_m_01J7NC9YKP3NB1PADF4SHZY712",
"VirtualAccountPurpose": "COLLECTION",
"Country": "GB",
"Status": "ACTIVE",
"Active": true,
"AccountOwner": "MGP PlatformTradingName",
"LocalAccountDetails": {
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"SortCode": "608382",
"AccountNumber": "21762697"
}
},
"InternationalAccountDetails": [
{
"Address": {
"StreetName": "2, Avenue Amélie",
"PostCode": "L-1125",
"TownName": "Luxembourg",
"CountrySubDivision": null,
"Country": "Luxembourg"
},
"Account": {
"Iban": "GB62SAPY60838221762697",
"Bic": "SAPYGB2L"
}
}
],
"Capabilities": {
"LocalPayinAvailable": true,
"InternationalPayinAvailable": true,
"Currencies": [
"GBP"
]
},
"ResultCode": "000000",
"ResultMessage": "Success"
}
]
// GET has no body parameters
<?php
require_once "../vendor/autoload.php";
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
use MangoPay\Pagination;
use MangoPay\Sorting;
use MangoPay\SortDirection;
$api = new MangoPayApi();
$api->Config->ClientId = "client-id";
$api->Config->ClientPassword = "api-key";
$api->Config->TemporaryFolder = "../tmp/";
$api->Config->DebugMode = false;
try {
$walletId = "wlt_m_01J30991BXBB7VF28PBS82EWD3";
$list = $api->VirtualAccounts->GetAll($walletId);
print_r($list);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk');
const mangopay = new mangopayInstance({
clientId: 'client-id',
clientApiKey: 'api-key',
})
let myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
const listWalletVirtualAccounts = async (walletId) => {
return await mangopay.VirtualAccounts.getAll(walletId)
.then((response) => {
console.info(response)
return response
}).catch((err) => {
console.log(err);
return false
});
}
listWalletVirtualAccounts(myWallet.Id)
require 'mangopay'
require 'PP'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'client-id'
client.client_apiKey = 'api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
myWallet = {
Id: 'wlt_m_01J30991BXBB7VF28PBS82EWD3'
}
def listWalletVirtualAccounts(walletId)
begin
response = MangoPay::VirtualAccount.fetch_all(walletId)
puts response
return response
end
end
pp(listWalletVirtualAccounts(myWallet[:Id]))
Was this page helpful?
⌘I