{
"Description": "New description of the wallet",
"Tag": "Updated 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 = '148968396';
$wallet = $api->Wallets->Get($walletId);
$wallet->Description = 'Updated again EUR Wallet';
$wallet->Tag = 'Updated using Mangopay PHP SDK';
$response = $api->Wallets->Update($wallet);
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 myWallet = {
Id: '174796439',
Description: 'updated description',
Tag: 'updated tag',
}
const updateWallet = async (wallet) => {
return await mangopay.Wallets.update(wallet)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
updateWallet(myWallet)
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 updateWallet(walletId, params)
begin
response = MangoPay::Wallet.update(walletId, params)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update wallet: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myWallet = {
Id: '194311640'
}
myParams = {
Description: 'Updated description',
Tag: 'Updated tag'
}
updateWallet(myWallet[:Id], myParams)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.entities.Wallet;
public class UpdateWallet {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Wallet wallet = mangopay.getWalletApi().get("wlt_m_01HSV2W1JYHZQMW24EWREKEN62");
wallet.setTag("Updated using the Mangopay Java SDK");
Wallet updateWallet = mangopay.getWalletApi().update(wallet);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(updateUbo);
System.out.println(updateWallet);
}
}
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, Wallet
natural_user = NaturalUser.get('213753890')
user_wallet = Wallet(
id = '215029593',
owners=[natural_user],
description='EUR Wallet of Rhoda Keeling'
)
update_wallet = user_wallet.save()
pprint(update_wallet)
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";
var walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT";
var wallet = new WalletPutDTO {
Owners = [userId],
Description = "BLIK Wallet",
Tag = "Updated using Mangopay .NET SDK"
};
var updateWallet = await api.Wallets.UpdateAsync(wallet, walletId);
string prettyPrint = JsonConvert.SerializeObject(updateWallet, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Description": "New description of the wallet",
"Owners": [
"user_m_01J18HZSACR1EMYNY1TBS8KTJD"
],
"Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG",
"Balance": {
"Currency": "EUR",
"Amount": 0
},
"Currency": "EUR",
"FundsType": "DEFAULT",
"Tag": "Updated using Mangopay API Postman collection",
"CreationDate": 1724921476
}
User wallets
Update a Wallet
PUT
/
v2.01
/
{ClientId}
/
wallets
/
{WalletId}
{
"Description": "New description of the wallet",
"Tag": "Updated 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 = '148968396';
$wallet = $api->Wallets->Get($walletId);
$wallet->Description = 'Updated again EUR Wallet';
$wallet->Tag = 'Updated using Mangopay PHP SDK';
$response = $api->Wallets->Update($wallet);
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 myWallet = {
Id: '174796439',
Description: 'updated description',
Tag: 'updated tag',
}
const updateWallet = async (wallet) => {
return await mangopay.Wallets.update(wallet)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
updateWallet(myWallet)
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 updateWallet(walletId, params)
begin
response = MangoPay::Wallet.update(walletId, params)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update wallet: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myWallet = {
Id: '194311640'
}
myParams = {
Description: 'Updated description',
Tag: 'Updated tag'
}
updateWallet(myWallet[:Id], myParams)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.entities.Wallet;
public class UpdateWallet {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Wallet wallet = mangopay.getWalletApi().get("wlt_m_01HSV2W1JYHZQMW24EWREKEN62");
wallet.setTag("Updated using the Mangopay Java SDK");
Wallet updateWallet = mangopay.getWalletApi().update(wallet);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(updateUbo);
System.out.println(updateWallet);
}
}
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, Wallet
natural_user = NaturalUser.get('213753890')
user_wallet = Wallet(
id = '215029593',
owners=[natural_user],
description='EUR Wallet of Rhoda Keeling'
)
update_wallet = user_wallet.save()
pprint(update_wallet)
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";
var walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT";
var wallet = new WalletPutDTO {
Owners = [userId],
Description = "BLIK Wallet",
Tag = "Updated using Mangopay .NET SDK"
};
var updateWallet = await api.Wallets.UpdateAsync(wallet, walletId);
string prettyPrint = JsonConvert.SerializeObject(updateWallet, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Description": "New description of the wallet",
"Owners": [
"user_m_01J18HZSACR1EMYNY1TBS8KTJD"
],
"Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG",
"Balance": {
"Currency": "EUR",
"Amount": 0
},
"Currency": "EUR",
"FundsType": "DEFAULT",
"Tag": "Updated using Mangopay API Postman collection",
"CreationDate": 1724921476
}
Path parameters
string
required
The unique identifier of the wallet.
Body parameters
string
Max. length: 255 charactersThe description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users).
string
Max. length: 255 charactersCustom data that you can add to this object.
For wallets, you can use this parameter to identify the corresponding end user in your platform.
For wallets, you can use this parameter to identify the corresponding end user in your platform.
Responses
200
200
string
Max. length: 255 charactersThe description of the wallet. It can be a name, the type, or anything else that can help you clearly identify the wallet on the platform (and for your end users).
array
stringThe unique identifier of the user owning the wallet.Note: Only one owner can be defined; this array accepts only one string.
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
object
The current balance of the wallet.
Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the balance.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the wallet.
string
Returned values:
DEFAULT, FEES, CREDITThe type of funds in the wallet:DEFAULT– Regular funds for user-owned wallets. Wallets with thisFundsTypecannot have a negative balance.FEES– Fees Wallet, for fees collected by the platform, specific to the Client Wallet object.CREDIT– Repudiation Wallet, for funds for the platform’s dispute management, specific to the Client Wallet object.
string
Max. length: 255 charactersCustom data that you can add to this object.
For wallets, you can use this parameter to identify the corresponding end user in your platform.
For wallets, you can use this parameter to identify the corresponding end user in your platform.
Unix timestamp
The date and time at which the wallet was created.
{
"Description": "New description of the wallet",
"Owners": [
"user_m_01J18HZSACR1EMYNY1TBS8KTJD"
],
"Id": "wlt_m_01J6EN9X1Q0PGM0CJ9QD197CRG",
"Balance": {
"Currency": "EUR",
"Amount": 0
},
"Currency": "EUR",
"FundsType": "DEFAULT",
"Tag": "Updated using Mangopay API Postman collection",
"CreationDate": 1724921476
}
{
"Description": "New description of the wallet",
"Tag": "Updated 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 = '148968396';
$wallet = $api->Wallets->Get($walletId);
$wallet->Description = 'Updated again EUR Wallet';
$wallet->Tag = 'Updated using Mangopay PHP SDK';
$response = $api->Wallets->Update($wallet);
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 myWallet = {
Id: '174796439',
Description: 'updated description',
Tag: 'updated tag',
}
const updateWallet = async (wallet) => {
return await mangopay.Wallets.update(wallet)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
updateWallet(myWallet)
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 updateWallet(walletId, params)
begin
response = MangoPay::Wallet.update(walletId, params)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to update wallet: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myWallet = {
Id: '194311640'
}
myParams = {
Description: 'Updated description',
Tag: 'Updated tag'
}
updateWallet(myWallet[:Id], myParams)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.entities.Wallet;
public class UpdateWallet {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Wallet wallet = mangopay.getWalletApi().get("wlt_m_01HSV2W1JYHZQMW24EWREKEN62");
wallet.setTag("Updated using the Mangopay Java SDK");
Wallet updateWallet = mangopay.getWalletApi().update(wallet);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(updateUbo);
System.out.println(updateWallet);
}
}
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, Wallet
natural_user = NaturalUser.get('213753890')
user_wallet = Wallet(
id = '215029593',
owners=[natural_user],
description='EUR Wallet of Rhoda Keeling'
)
update_wallet = user_wallet.save()
pprint(update_wallet)
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";
var walletId = "wlt_m_01J2Y06CEN8J3K19KP0F7YJVNT";
var wallet = new WalletPutDTO {
Owners = [userId],
Description = "BLIK Wallet",
Tag = "Updated using Mangopay .NET SDK"
};
var updateWallet = await api.Wallets.UpdateAsync(wallet, walletId);
string prettyPrint = JsonConvert.SerializeObject(updateWallet, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I