{
"OwnerName": "Alex Smith",
"Country": "FR",
"Tag": "Created using Mangopay API Postman Collection"
}
<?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 {
$walletId = '194311530';
$bankingAlias = new \MangoPay\BankingAliasIBAN();
$bankingAlias->OwnerName = 'Alex Smith';
$bankingAlias->Tag = 'Updated using Mangopay PHP SDK';
$bankingAlias->Country ='FR';
$bankingAlias->WalletId = $walletId;
$response = $api->BankingAliases->Create($bankingAlias);
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 myBankingAlias = {
OwnerName: 'John',
Tag: 'Created with Mangopay NodeJS SDK',
Country: 'FR',
Type: 'IBAN',
WalletId: '172463559',
}
const createBankingAlias = async (bankingAlias) => {
return await mangopay.BankingAliases.create(bankingAlias)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createBankingAlias(myBankingAlias)
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 createBankingAlias(bankingAliasObject, walletId)
begin
response = MangoPay::BankingAliasesIBAN.create(bankingAliasObject, walletId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to create banking alias: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myBankingAlias = {
OwnerName: 'John',
Tag: 'Created with Mangopay NodeJS SDK',
Country: 'FR',
Type: 'IBAN',
WalletId: '194311640'
}
myWallet = {
Id: '194311640'
}
createBankingAlias(myBankingAlias, myWallet[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.enumerations.CountryIso;
import com.mangopay.entities.BankingAlias;
import com.mangopay.entities.UserNatural;
public class CreateIbanBankingAlias {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
UserNatural user = mangopay.getUserApi().getNatural("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT");
var walletId = "wlt_m_01J1YRFBF1EDX4TK2A5G0MNRSN";
BankingAlias bankingAlias = new BankingAlias();
bankingAlias.setOwnerName(String.format("%s %s", user.getFirstName(), user.getLastName()));
bankingAlias.setCountry(CountryIso.FR);
BankingAlias createBankingAlias = mangopay.getBankingAliases().create(walletId, bankingAlias);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(createBankingAlias);
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.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import NaturalUser, Wallet, BankingAliasIBAN
natural_user = NaturalUser.get('213753890')
user_wallet = Wallet.get('215029593')
iban_alias = BankingAliasIBAN(
owner_name = f'{natural_user.first_name} {natural_user.last_name}',
credited_user = natural_user,
wallet_id = user_wallet.id,
tag = 'Create using the Mangopay Python SDK',
country = 'FR'
)
create_iban_alias = iban_alias.save()
pprint(create_iban_alias)
using MangoPay.SDK;
using MangoPay.SDK.Entities.PUT;
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";
UserNaturalDTO user = await api.Users.GetNaturalAsync(userId);
var walletId = "wlt_m_01J3D02K6ETV3BDP88C7PD2NDB";
var bankingAliasIban = new BankingAliasIbanPostDTO(
user.FirstName + " " + user.LastName,
CountryIso.FR
) {
Tag = "Created using the Mangopay .NET SDK"
};
var createBankingAlias = await api.BankingAlias.CreateIbanAsync(walletId, bankingAliasIban);
string prettyPrint = JsonConvert.SerializeObject(createBankingAlias, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"OwnerName": "Alex Smith",
"IBAN": "FR7674521100005657670994474",
"BIC": "MPAYFRP1PIN",
"CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA",
"Country": "FR",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1710846581,
"Active": true,
"Type": "IBAN",
"Id": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA",
"WalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96"
}
{
"OwnerName": "Alex Smith",
"IBAN": "GB78SAPY60838221394585",
"BIC": null,
"LocalAccountDetails": {
"SortCode": "608382",
"AccountNumber": "21394585"
},
"CreditedUserId": "user_m_01JADFDBCZS25REHAF6M0NJH5G",
"Country": "GB",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1730883439,
"Active": true,
"Type": "GB",
"Id": "wltbank_01JC0B2JH632KTAGSM0ZBJYG7Q",
"WalletId": "wlt_m_01JC0B1VZA7YG1J4YC21E60PZM"
}
Banking alias
Create an IBAN Banking Alias
POST
/
v2.01
/
{ClientId}
/
wallets
/
{WalletId}
/
bankingaliases
/
iban
{
"OwnerName": "Alex Smith",
"Country": "FR",
"Tag": "Created using Mangopay API Postman Collection"
}
<?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 {
$walletId = '194311530';
$bankingAlias = new \MangoPay\BankingAliasIBAN();
$bankingAlias->OwnerName = 'Alex Smith';
$bankingAlias->Tag = 'Updated using Mangopay PHP SDK';
$bankingAlias->Country ='FR';
$bankingAlias->WalletId = $walletId;
$response = $api->BankingAliases->Create($bankingAlias);
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 myBankingAlias = {
OwnerName: 'John',
Tag: 'Created with Mangopay NodeJS SDK',
Country: 'FR',
Type: 'IBAN',
WalletId: '172463559',
}
const createBankingAlias = async (bankingAlias) => {
return await mangopay.BankingAliases.create(bankingAlias)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createBankingAlias(myBankingAlias)
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 createBankingAlias(bankingAliasObject, walletId)
begin
response = MangoPay::BankingAliasesIBAN.create(bankingAliasObject, walletId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to create banking alias: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myBankingAlias = {
OwnerName: 'John',
Tag: 'Created with Mangopay NodeJS SDK',
Country: 'FR',
Type: 'IBAN',
WalletId: '194311640'
}
myWallet = {
Id: '194311640'
}
createBankingAlias(myBankingAlias, myWallet[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.enumerations.CountryIso;
import com.mangopay.entities.BankingAlias;
import com.mangopay.entities.UserNatural;
public class CreateIbanBankingAlias {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
UserNatural user = mangopay.getUserApi().getNatural("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT");
var walletId = "wlt_m_01J1YRFBF1EDX4TK2A5G0MNRSN";
BankingAlias bankingAlias = new BankingAlias();
bankingAlias.setOwnerName(String.format("%s %s", user.getFirstName(), user.getLastName()));
bankingAlias.setCountry(CountryIso.FR);
BankingAlias createBankingAlias = mangopay.getBankingAliases().create(walletId, bankingAlias);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(createBankingAlias);
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.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import NaturalUser, Wallet, BankingAliasIBAN
natural_user = NaturalUser.get('213753890')
user_wallet = Wallet.get('215029593')
iban_alias = BankingAliasIBAN(
owner_name = f'{natural_user.first_name} {natural_user.last_name}',
credited_user = natural_user,
wallet_id = user_wallet.id,
tag = 'Create using the Mangopay Python SDK',
country = 'FR'
)
create_iban_alias = iban_alias.save()
pprint(create_iban_alias)
using MangoPay.SDK;
using MangoPay.SDK.Entities.PUT;
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";
UserNaturalDTO user = await api.Users.GetNaturalAsync(userId);
var walletId = "wlt_m_01J3D02K6ETV3BDP88C7PD2NDB";
var bankingAliasIban = new BankingAliasIbanPostDTO(
user.FirstName + " " + user.LastName,
CountryIso.FR
) {
Tag = "Created using the Mangopay .NET SDK"
};
var createBankingAlias = await api.BankingAlias.CreateIbanAsync(walletId, bankingAliasIban);
string prettyPrint = JsonConvert.SerializeObject(createBankingAlias, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"OwnerName": "Alex Smith",
"IBAN": "FR7674521100005657670994474",
"BIC": "MPAYFRP1PIN",
"CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA",
"Country": "FR",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1710846581,
"Active": true,
"Type": "IBAN",
"Id": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA",
"WalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96"
}
{
"OwnerName": "Alex Smith",
"IBAN": "GB78SAPY60838221394585",
"BIC": null,
"LocalAccountDetails": {
"SortCode": "608382",
"AccountNumber": "21394585"
},
"CreditedUserId": "user_m_01JADFDBCZS25REHAF6M0NJH5G",
"Country": "GB",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1730883439,
"Active": true,
"Type": "GB",
"Id": "wltbank_01JC0B2JH632KTAGSM0ZBJYG7Q",
"WalletId": "wlt_m_01JC0B1VZA7YG1J4YC21E60PZM"
}
Deprecated – Decommissioning planned for 2027Mangopay plans to decommission the Banking Alias endpoints in 2027.Platforms using them should plan to re-integrate using the Virtual Account endpoints.Existing Banking Alias objects are available via the GET View a Virtual Account endpoint by using the Banking Alias
Id and WalletId as path parameters.Caution – Rely on
OwnerName returned in responseSince September 15, 2025, Mangopay sets the OwnerName value by default based on the criteria available here.Your platform must rely on the API response value (also available on the GET endpoints) and ensure it is easy to see and copy for the end user in your interfaces.Note - Payee confirmation in the UKWhen the user sets up the payee with their bank, Mangopay UK or Mangopay SA is displayed as the account holder name. You should communicate this to them to avoid confusion.
Path parameters
string
required
The unique identifier of the wallet.
Body parameters
string
required
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
required
Allowed values: DE, DK, ES, FR, GB, LU, PLThe country of the banking alias. The country must correspond to the currency of the wallet.
string
Max. length: 255 charactersCustom data that you can add to this object.
Responses
200 - FR
200 - FR
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
The IBAN (international bank account number) of the banking alias.
string
The BIC (international identifier of the bank) for the banking alias.
string
The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.
Note: Once the banking alias is created, it is not possible to change the
Note: Once the banking alias is created, it is not possible to change the
CreditedUserId.string
Returned values: DE, DK, ES, FR, GB, LU, PLThe country of the banking alias. The country must correspond to the currency of the wallet.
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.
boolean
Whether or not the banking alias is active.Caution: Setting this value to
false is irreversible.string
Returned values:
IBAN, GBThe type of banking alias.The GB value is only returned if the Country is GB.string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
The unique identifier of the wallet.
200 - GB
200 - GB
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
The IBAN (international bank account number) of the banking alias.
string
The BIC (international identifier of the bank) for the banking alias.
object
string
The unique identifier of the user whose wallet is credited, in other words, the Owner of the wallet for which the alias is created.
Note: Once the banking alias is created, it is not possible to change the
Note: Once the banking alias is created, it is not possible to change the
CreditedUserId.string
Returned values: DE, DK, ES, FR, GB, LU, PLThe country of the banking alias. The country must correspond to the currency of the wallet.
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.
boolean
Whether or not the banking alias is active.Caution: Setting this value to
false is irreversible.string
Returned values:
IBAN, GBThe type of banking alias.The GB value is only returned if the Country is GB.string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
The unique identifier of the wallet.
400 - Country not supported
400 - Country not supported
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "fd020620-8e5c-4b64-925c-aa980e42c237#1670340996",
"Date": 1670340997.0,
"errors": {
"Country": "The requested country is not supported"
}
}
400 - Wallet already has a Banking Alias
400 - Wallet already has a Banking Alias
{
"Message": "There is already a banking alias existing for this wallet",
"Type": "wallet_banking_alias_already_exists",
"Id": "77b73aa3-e08e-4e04-9ffd-5c94ed4f73ff",
"Date": 1732178114,
"errors": null
}
400 - Invalid country for wallet currency
400 - Invalid country for wallet currency
{
"Message": "Invalid country GB for EUR wallet. Possible value(s): LU/FR/ES/DE.",
"Type": "country_not_associated_to_wallet_currency",
"Id": "1eb1c947-bac2-4127-a636-fe7d811db9e7",
"Date": 1725288513.0,
"errors": null
}
403 - Feature not activated
403 - Feature not activated
{
"Message": "This endpoint is not available for your account",
"Type": "forbidden_ressource",
"Id": "441d156a-ebd1-421e-851b-460a25c6a53f#1670262779",
"Date": 1670262780.0,
"errors": null
}
{
"OwnerName": "Alex Smith",
"IBAN": "FR7674521100005657670994474",
"BIC": "MPAYFRP1PIN",
"CreditedUserId": "user_m_01HSB23417BFG7YXR7E371JSEA",
"Country": "FR",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1710846581,
"Active": true,
"Type": "IBAN",
"Id": "wltbank_m_01HSB6E769Y3ZBYDJACSP3THGA",
"WalletId": "wlt_m_01HSB6DE1YT1EMTH0K7ASYPG96"
}
{
"OwnerName": "Alex Smith",
"IBAN": "GB78SAPY60838221394585",
"BIC": null,
"LocalAccountDetails": {
"SortCode": "608382",
"AccountNumber": "21394585"
},
"CreditedUserId": "user_m_01JADFDBCZS25REHAF6M0NJH5G",
"Country": "GB",
"Tag": "Created using Mangopay API Postman Collection",
"CreationDate": 1730883439,
"Active": true,
"Type": "GB",
"Id": "wltbank_01JC0B2JH632KTAGSM0ZBJYG7Q",
"WalletId": "wlt_m_01JC0B1VZA7YG1J4YC21E60PZM"
}
{
"OwnerName": "Alex Smith",
"Country": "FR",
"Tag": "Created using Mangopay API Postman Collection"
}
<?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 {
$walletId = '194311530';
$bankingAlias = new \MangoPay\BankingAliasIBAN();
$bankingAlias->OwnerName = 'Alex Smith';
$bankingAlias->Tag = 'Updated using Mangopay PHP SDK';
$bankingAlias->Country ='FR';
$bankingAlias->WalletId = $walletId;
$response = $api->BankingAliases->Create($bankingAlias);
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 myBankingAlias = {
OwnerName: 'John',
Tag: 'Created with Mangopay NodeJS SDK',
Country: 'FR',
Type: 'IBAN',
WalletId: '172463559',
}
const createBankingAlias = async (bankingAlias) => {
return await mangopay.BankingAliases.create(bankingAlias)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createBankingAlias(myBankingAlias)
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 createBankingAlias(bankingAliasObject, walletId)
begin
response = MangoPay::BankingAliasesIBAN.create(bankingAliasObject, walletId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to create banking alias: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myBankingAlias = {
OwnerName: 'John',
Tag: 'Created with Mangopay NodeJS SDK',
Country: 'FR',
Type: 'IBAN',
WalletId: '194311640'
}
myWallet = {
Id: '194311640'
}
createBankingAlias(myBankingAlias, myWallet[:Id])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.enumerations.CountryIso;
import com.mangopay.entities.BankingAlias;
import com.mangopay.entities.UserNatural;
public class CreateIbanBankingAlias {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
UserNatural user = mangopay.getUserApi().getNatural("user_m_01HT2NFK7Z2BRQNGNHMY30VVTT");
var walletId = "wlt_m_01J1YRFBF1EDX4TK2A5G0MNRSN";
BankingAlias bankingAlias = new BankingAlias();
bankingAlias.setOwnerName(String.format("%s %s", user.getFirstName(), user.getLastName()));
bankingAlias.setCountry(CountryIso.FR);
BankingAlias createBankingAlias = mangopay.getBankingAliases().create(walletId, bankingAlias);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(createBankingAlias);
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.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import NaturalUser, Wallet, BankingAliasIBAN
natural_user = NaturalUser.get('213753890')
user_wallet = Wallet.get('215029593')
iban_alias = BankingAliasIBAN(
owner_name = f'{natural_user.first_name} {natural_user.last_name}',
credited_user = natural_user,
wallet_id = user_wallet.id,
tag = 'Create using the Mangopay Python SDK',
country = 'FR'
)
create_iban_alias = iban_alias.save()
pprint(create_iban_alias)
using MangoPay.SDK;
using MangoPay.SDK.Entities.PUT;
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";
UserNaturalDTO user = await api.Users.GetNaturalAsync(userId);
var walletId = "wlt_m_01J3D02K6ETV3BDP88C7PD2NDB";
var bankingAliasIban = new BankingAliasIbanPostDTO(
user.FirstName + " " + user.LastName,
CountryIso.FR
) {
Tag = "Created using the Mangopay .NET SDK"
};
var createBankingAlias = await api.BankingAlias.CreateIbanAsync(walletId, bankingAliasIban);
string prettyPrint = JsonConvert.SerializeObject(createBankingAlias, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?