<?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 {
$userId ='146476890';
$year = 2023;
$month = 6;
$response = $api->Users->GetEMoney($userId, $year, $month);
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 myUser = {
Id: '146476890',
}
// timeframe is optional, if not given, returns all the credited and debited e-money since the user was created.
let timeframe = {
Year: '2023',
Month: '04',
}
const viewClientWallet = async (userId, year, month) => {
return await mangopay.Users.getEMoney(userId, year, month)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewClientWallet(myUser.Id, timeframe.Year, timeframe.Month)
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 viewUserEmoney(userId, year, month)
begin
response = MangoPay::User.emoney(userId, year, month)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch emoney: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: '194338122'
}
# timeframe is optional, if not given, returns all the credited and debited e-money since the user was created.
timeFrame = {
year: 2023,
month: 06
}
viewUserEmoney(myUser[:Id], timeFrame[:year], timeFrame[:month])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.entities.EMoney;
public class ViewUserEMoney {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE";
EMoney viewEMoney = mangopay.getUserApi().getEMoney(userId, "2023");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewEMoney);
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.resources import NaturalUser, EMoney
natural_user = NaturalUser.get('213753890')
view_user_emoney = natural_user.get_emoney()
view_user_emoney = view_user_emoney.data[0]
pprint(vars(view_user_emoney))
using MangoPay.SDK;
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_01HQK25M6KVHKDV0S36JY9NRKR";
var viewUserEMoney = await api.Users.GetEmoneyAsync(userId);
string prettyPrint = JsonConvert.SerializeObject(viewUserEMoney, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"UserId": "156671912",
"CreditedEMoney": {
"Currency": "EUR",
"Amount": 2900
},
"DebitedEMoney": {
"Currency": "EUR",
"Amount": 1000
}
}
User e-money
View User EMoney
GET
/
v2.01
/
{ClientId}
/
users
/
{UserId}
/
emoney
/
{Year}
/
{Month}
<?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 {
$userId ='146476890';
$year = 2023;
$month = 6;
$response = $api->Users->GetEMoney($userId, $year, $month);
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 myUser = {
Id: '146476890',
}
// timeframe is optional, if not given, returns all the credited and debited e-money since the user was created.
let timeframe = {
Year: '2023',
Month: '04',
}
const viewClientWallet = async (userId, year, month) => {
return await mangopay.Users.getEMoney(userId, year, month)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewClientWallet(myUser.Id, timeframe.Year, timeframe.Month)
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 viewUserEmoney(userId, year, month)
begin
response = MangoPay::User.emoney(userId, year, month)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch emoney: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: '194338122'
}
# timeframe is optional, if not given, returns all the credited and debited e-money since the user was created.
timeFrame = {
year: 2023,
month: 06
}
viewUserEmoney(myUser[:Id], timeFrame[:year], timeFrame[:month])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.entities.EMoney;
public class ViewUserEMoney {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE";
EMoney viewEMoney = mangopay.getUserApi().getEMoney(userId, "2023");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewEMoney);
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.resources import NaturalUser, EMoney
natural_user = NaturalUser.get('213753890')
view_user_emoney = natural_user.get_emoney()
view_user_emoney = view_user_emoney.data[0]
pprint(vars(view_user_emoney))
using MangoPay.SDK;
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_01HQK25M6KVHKDV0S36JY9NRKR";
var viewUserEMoney = await api.Users.GetEmoneyAsync(userId);
string prettyPrint = JsonConvert.SerializeObject(viewUserEMoney, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"UserId": "156671912",
"CreditedEMoney": {
"Currency": "EUR",
"Amount": 2900
},
"DebitedEMoney": {
"Currency": "EUR",
"Amount": 1000
}
}
The path parameters
Month and Year are optional. If not given, this call returns all the credited and debited e-money since the user was created.
Path parameters
string
required
The unique identifier of the user.
string
Format: “YYYY” (e.g., “2019”)The year by which to filter the returned values.
string
Format: “MM” (e.g., “03”)The month by which to filter the returned values.
Body parameters
string
Allowed 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 wallets for which to return the values for credited and debited e-money.
Responses
200
200
string
The unique identifier of the user.
object
Information about the pay-ins and transfers credited to wallets owned by the user.
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 amount.
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).object
Information about the payouts debited from wallets owned by the user.
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 amount.
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).{
"UserId": "156671912",
"CreditedEMoney": {
"Currency": "EUR",
"Amount": 2900
},
"DebitedEMoney": {
"Currency": "EUR",
"Amount": 1000
}
}
<?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 {
$userId ='146476890';
$year = 2023;
$month = 6;
$response = $api->Users->GetEMoney($userId, $year, $month);
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 myUser = {
Id: '146476890',
}
// timeframe is optional, if not given, returns all the credited and debited e-money since the user was created.
let timeframe = {
Year: '2023',
Month: '04',
}
const viewClientWallet = async (userId, year, month) => {
return await mangopay.Users.getEMoney(userId, year, month)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
viewClientWallet(myUser.Id, timeframe.Year, timeframe.Month)
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 viewUserEmoney(userId, year, month)
begin
response = MangoPay::User.emoney(userId, year, month)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch emoney: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myUser = {
Id: '194338122'
}
# timeframe is optional, if not given, returns all the credited and debited e-money since the user was created.
timeFrame = {
year: 2023,
month: 06
}
viewUserEmoney(myUser[:Id], timeFrame[:year], timeFrame[:month])
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.entities.EMoney;
public class ViewUserEMoney {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
var userId = "user_m_01HRS7PQEGE4YGCM1AZK1ENTGE";
EMoney viewEMoney = mangopay.getUserApi().getEMoney(userId, "2023");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(viewEMoney);
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.resources import NaturalUser, EMoney
natural_user = NaturalUser.get('213753890')
view_user_emoney = natural_user.get_emoney()
view_user_emoney = view_user_emoney.data[0]
pprint(vars(view_user_emoney))
using MangoPay.SDK;
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_01HQK25M6KVHKDV0S36JY9NRKR";
var viewUserEMoney = await api.Users.GetEmoneyAsync(userId);
string prettyPrint = JsonConvert.SerializeObject(viewUserEMoney, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?