Skip to main content

Overview

The Banking Aliases API allows you to create and manage IBAN banking aliases for wallets. Banking aliases enable your users to receive funds on their wallet via bank wire, making it easier to fund wallets without going through traditional payment flows. Currently, only IBAN banking aliases are supported, which can be used for COLLECTION or USER_OWNED purposes.

Methods

Get

Retrieve a banking alias by its ID.
public function Get($bankingAliasId)
bankingAliasId
string
required
The unique identifier of the banking alias
Returns: BankingAlias - The banking alias object Example:
$api = new MangoPay\MangoPayApi();
$bankingAlias = $api->BankingAliases->Get('bankalias_123456');

Create

Create a new banking alias for a wallet.
public function Create($bankingAlias)
bankingAlias
BankingAliasIBAN
required
The banking alias object to create. Currently only BankingAliasIBAN is supported.
Returns: BankingAliasIBAN - The created banking alias object Throws: Libraries\Exception - If the entity class is not supported Example:
$api = new MangoPay\MangoPayApi();

$bankingAlias = new MangoPay\BankingAliasIBAN();
$bankingAlias->WalletId = 'wallet_123456';
$bankingAlias->OwnerName = 'John Doe';
$bankingAlias->Tag = 'Custom tag';
$bankingAlias->VirtualAccountPurpose = 'COLLECTION';

$createdAlias = $api->BankingAliases->Create($bankingAlias);

Update

Update an existing banking alias.
public function Update($bankingAlias)
bankingAlias
BankingAlias
required
The banking alias object with updated properties. Must include the banking alias ID.
Returns: BankingAlias - The updated banking alias object Example:
$bankingAlias = $api->BankingAliases->Get('bankalias_123456');
$bankingAlias->Active = false;
$updatedAlias = $api->BankingAliases->Update($bankingAlias);

GetAll

Retrieve all banking aliases for a specific wallet.
public function GetAll($walletId, & $pagination = null, $sorting = null)
walletId
string
required
The wallet identifier
pagination
Pagination
Pagination object (passed by reference, updated with total count)
sorting
Sorting
Sorting configuration object
Returns: BankingAlias[] - Array of banking alias objects Example:
$pagination = new MangoPay\Pagination(1, 10);
$bankingAliases = $api->BankingAliases->GetAll('wallet_123456', $pagination);

foreach ($bankingAliases as $alias) {
    echo "IBAN: " . $alias->IBAN . "\n";
}

BankingAlias Entity

The BankingAlias entity represents a banking alias with the following properties:
Id
string
The unique identifier of the banking alias
Tag
string
Custom data that you can add to this item
CreationDate
int
Unix timestamp of when the banking alias was created
CreditedUserId
string
The user ID who was credited
WalletId
string
The ID of the wallet this alias is attached to
Type
string
The type of banking alias. Currently supports: IBAN, GB
OwnerName
string
The name of the owner of the bank account
Active
bool
Whether the banking alias is active or not
VirtualAccountPurpose
string
The type of the virtual account. Allowed values: COLLECTION, USER_OWNED

BankingAliasIBAN Entity

Extends BankingAlias with IBAN-specific properties:
IBAN
string
The International Bank Account Number
BIC
string
The Bank Identifier Code
Country
string
The country of the IBAN (ISO 3166-1 alpha-2 format)

Build docs developers (and LLMs) love