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

Id
string

string:

Maximum length is 255 characters

The item's ID

CreationDate
timestamp

timestamp

When the item was created

Tag
string

string:

Maximum length is 255 characters

Custom data that you can add to this item

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 (beta), CAD (beta), AUD (beta), XXX

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 (beta), CAD (beta), AUD (beta), XXX

ISO 4217 format

The currency - should be ISO_4217 format

{
"Id": "8494514",
"CreationDate": 12926321,
"Tag": "custom meta",
"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

Tag
string

string:

Maximum length is 255 characters

optional

Custom data that you can add to this item

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 (beta), CAD (beta), AUD (beta), XXX

ISO 4217 format

required

The currency - should be ISO_4217 format

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

try {


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

$Result = $Api->Wallets->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 :
{
"Tag": "",
"Owners": [ "" ],
"Description": "",
"Currency": ""
}

Update a Wallet

PUT .../v2.01/ClientId

The ID of your client account

/wallets/WalletId

The ID of a wallet

/

Parameters

Tag
string

string:

Maximum length is 255 characters

optional

Custom data that you can add to this item

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 :
{
"Tag": "custom meta",
"Description": "My big project"
}
require_once("mangopay.php");

try {

$Wallet = new \MangoPay\Wallet();
$Wallet->Tag = "custom meta";
$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 :
{
"Tag": "",
"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/

Get parameters

Page
int

int

optional

The page number of results you wish to return

Per_Page
int

int

optional

The number of results to return per page

Sort
ColumnAndDirection

ColumnAndDirection:

The column to sort against and direction, separated by a :

optional

The column to sort against and direction - only CreationDate (or Date for the events) is available and ASC or DESC for the direction

  • 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 Parameters :
{
"Page": 1,
"Per_Page": 25,
"Sort": "CreationDate:DESC"
}
GET .../users//wallets/ HTTP/1.1
Get Parameters :
{
"Page": ,
"Per_Page": ,
"Sort": ""
}