The Wallet object

A Wallet is an object in which PayIns and Transfers from users are stored in order to collect money. You can pay into a Wallet, withdraw funds from a wallet or transfer funds from a Wallet to another Wallet.

Parameters

Owners
list

list

An array of userIDs of who own's the wallet. For now, you only can set up a unique owner.

Balance
Money

Money:

View Sub-parameters

The current balance of the wallet

Balance.Currency
CurrencyIso

CurrencyIso:

EUR, GBP, PLN, CHF, NOK, SEK, DKK, USD, CAD , AUD, JPY, HKD, AED

ISO 4217 format

The currency - should be ISO_4217 format

Balance.Amount
int

int

An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)

FundsType
FundsType

FundsType:

DEFAULT, FEES, CREDIT

The type of funds in the wallet

Description
string

string:

Maximum length is 255 characters

A desciption of the wallet

Currency
CurrencyIso

CurrencyIso:

EUR, GBP, PLN, CHF, NOK, SEK, DKK, USD, CAD , AUD, JPY, HKD, AED

ISO 4217 format

The currency - should be ISO_4217 format

{
"Owners": [ "8494514" ],
"Balance": {
"Currency": "EUR",
"Amount": 12
},
"FundsType": "DEFAULT",
"Description": "My big project",
"Currency": "EUR"
}

Create a Wallet

Once a wallet is created, its Currency can not be changed

POST .../v2.01/ClientId

The ID of your client account

/wallets/

Parameters

Owners
list

list

required

An array of userIDs of who own's the wallet. For now, you only can set up a unique owner.

Description
string

string:

Maximum length is 255 characters

required

A desciption of the wallet

Currency
CurrencyIso

CurrencyIso:

EUR, GBP, PLN, CHF, NOK, SEK, DKK, USD, CAD , AUD, JPY, HKD, AED

ISO 4217 format

required

The currency - should be ISO_4217 format

Tag
string

string:

Maximum length is 255 characters

optional

Custom data that you can add to this item

  • View
  • Code
  • Run
  • View
  • Code
  • Run
POST .../wallets/ HTTP/1.1
Body Parameters :
{
"Owners": [ "8494514" ],
"Description": "My big project",
"Currency": "EUR",
"Tag": "custom meta"
}
require_once("mangopay.php");

try {


$Wallet = new \MangoPay\Wallet();
$Wallet->Owners = array ("8494514");
$Wallet->Description = "My big project";
$Wallet->Currency = "EUR";
$Wallet->Tag = "custom meta";

$Result = $Api->->Create($Wallet);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
POST .../wallets/ HTTP/1.1
Body Parameters :
{
"Owners": [ "" ],
"Description": "",
"Currency": "",
"Tag": ""
}

Update a Wallet

PUT .../v2.01/ClientId

The ID of your client account

/wallets/WalletId

The ID of a wallet

/

Parameters

Description
string

string:

Maximum length is 255 characters

optional

A desciption of the wallet

  • View
  • Code
  • Run
  • View
  • Code
  • Run
PUT .../wallets/:WalletId/ HTTP/1.1
Body Parameters :
{
"Description": "My big project"
}
require_once("mangopay.php");

try {

$Wallet = new \MangoPay\Wallet();
$Wallet->Description = "My big project";
$Wallet->Id = 8494559;

$Result = $Api->Wallets->Update($Wallet);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
PUT .../wallets// HTTP/1.1
Body Parameters :
{
"Description": ""
}

View a Wallet

GET .../v2.01/ClientId

The ID of your client account

/wallets/WalletId

The ID of a wallet

/
  • View
  • Code
  • Run
  • View
  • Code
  • Run
GET .../wallets/:WalletId/ HTTP/1.1
require_once("mangopay.php");

try {

$WalletId = 8494559;

$Wallet = $Api->Wallets->Get($WalletId);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
GET .../wallets// HTTP/1.1

List Wallets for a User

GET .../v2.01/ClientId

The ID of your client account

/users/UserId

A Mangopay user's ID

/wallets/
  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
GET .../users/:UserId/wallets/ HTTP/1.1
GET .../users//wallets/ HTTP/1.1
Live chat
No agent is free at the moment please send us a request through our contact form