// GET has no body parameters
<?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 {
$response = $api->Users->GetAll();
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-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
const listUsers = async () => {
return await mangopay.Users.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listUsers()
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 listAllUsers()
begin
response = MangoPay::User.fetch()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch Users #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listAllUsers()
import com.mangopay.MangoPayApi;
import com.mangopay.core.Address;
import com.mangopay.core.Pagination;
import com.mangopay.core.Sorting;
import com.mangopay.core.enumerations.SortDirection;
import com.mangopay.entities.User;
import java.lang.reflect.Field;
import java.util.List;
public class ListAllUsers {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Pagination pagination = new Pagination(1, 100);
Sorting sort = new Sorting();
sort.addField("CreationDate", SortDirection.desc);
List<User> users = mangopay.getUserApi().getAll(pagination, sort);
for (User user : users) {
user = mangopay.getUserApi().get(user.getId());
System.out.println("\nid: " + user.getId());
printObjectFields(user);
}
}
private static void printObjectFields(Object obj) {
Class<?> objClass = obj.getClass();
Field[] fields = objClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
Object value = field.get(obj);
if (value instanceof Address) {
System.out.println(field.getName() + ": ");
printObjectFields(value);
} else {
System.out.println(field.getName() + ": " + value);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
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 User
users = User.all(page=1, per_page=50)
for user in users:
pprint(vars(user))
using MangoPay.SDK;
using MangoPay.SDK.Entities;
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 sort = new Sort();
sort.AddField("CreationDate", SortDirection.desc);
var users = await api.Users.GetAllAsync(new Pagination(1, 20), sort);
string prettyPrint = JsonConvert.SerializeObject(users, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"Id": "158026537",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670863988,
"PersonType": "LEGAL",
"Email": "richard.moulin@email.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
},
{
"Id": "158025445",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670862022,
"PersonType": "NATURAL",
"Email": "email@test.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670862022,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
},
{
"Id": "158026721",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670864174,
"PersonType": "LEGAL",
"Email": "cortney_douglas@yahoo.com",
"KYCLevel": "REGULAR",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670864174,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
]
Users
List all Users
List User objects and key details
GET
/
v2.01
/
{ClientId}
/
users
// GET has no body parameters
<?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 {
$response = $api->Users->GetAll();
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-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
const listUsers = async () => {
return await mangopay.Users.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listUsers()
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 listAllUsers()
begin
response = MangoPay::User.fetch()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch Users #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listAllUsers()
import com.mangopay.MangoPayApi;
import com.mangopay.core.Address;
import com.mangopay.core.Pagination;
import com.mangopay.core.Sorting;
import com.mangopay.core.enumerations.SortDirection;
import com.mangopay.entities.User;
import java.lang.reflect.Field;
import java.util.List;
public class ListAllUsers {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Pagination pagination = new Pagination(1, 100);
Sorting sort = new Sorting();
sort.addField("CreationDate", SortDirection.desc);
List<User> users = mangopay.getUserApi().getAll(pagination, sort);
for (User user : users) {
user = mangopay.getUserApi().get(user.getId());
System.out.println("\nid: " + user.getId());
printObjectFields(user);
}
}
private static void printObjectFields(Object obj) {
Class<?> objClass = obj.getClass();
Field[] fields = objClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
Object value = field.get(obj);
if (value instanceof Address) {
System.out.println(field.getName() + ": ");
printObjectFields(value);
} else {
System.out.println(field.getName() + ": " + value);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
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 User
users = User.all(page=1, per_page=50)
for user in users:
pprint(vars(user))
using MangoPay.SDK;
using MangoPay.SDK.Entities;
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 sort = new Sort();
sort.AddField("CreationDate", SortDirection.desc);
var users = await api.Users.GetAllAsync(new Pagination(1, 20), sort);
string prettyPrint = JsonConvert.SerializeObject(users, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"Id": "158026537",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670863988,
"PersonType": "LEGAL",
"Email": "richard.moulin@email.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
},
{
"Id": "158025445",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670862022,
"PersonType": "NATURAL",
"Email": "email@test.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670862022,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
},
{
"Id": "158026721",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670864174,
"PersonType": "LEGAL",
"Email": "cortney_douglas@yahoo.com",
"KYCLevel": "REGULAR",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670864174,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
]
This endpoint returns key information for each user created by the platform.
Query parameters
integer
Start value:
1Default value: 1Indicates the index of the page for the pagination.integer
Min. value:
1; max. value: 100Default value: 10Indicates the number of items returned for each page of the pagination.string
Possible values:
CreationDate:ASC, CreationDate:DESCDefault value: CreationDate:ASCIndicates the direction in which to sort the list.Responses
200
200
array
The list of users created by the platform.
Show properties
Show properties
object
The key information on the user created by the platform.
Show properties
Show properties
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
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.
string
Returned values: NATURAL, LEGALThe type of the user:
NATURAL– Natural users are individuals (natural persons).LEGAL– Legal users are legal entities (legal persons) like companies, non-profits, and sole proprietors.
PersonType is defined by the endpoint used to create the user and can’t be modified.string
Format: A valid email addressThe email address of the user.
string
Default value:
LIGHTReturned values: LIGHT, REGULARThe verification status of the user set by Mangopay:LIGHT– Unverified, assigned by default to all users.REGULAR– Verified, meaning the user has successfully completed the verification process and had the necessary documents validated by Mangopay. Only users whoseUserCategoryisOWNERcan submit verification documents for validation. Only users whoseKYCLevelisREGULARcan request payouts.
boolean
Whether the user has accepted Mangopay’s terms and conditions (as defined by your contract, see the T&Cs guide for details).Must be
true if UserCategory is OWNER.Unix timestamp
The date and time at which the
TermsAndConditionsAccepted value was set to true.Returned null if UserCategory is PAYER.string
Possible values:
PAYER, OWNER, PLATFORMThe category of the user:PAYER– User who can only make pay-ins to their wallets and transfers to other wallets (as well as refunds for pay-ins and transfers).OWNER– User who can also receive transfers to their wallets. Owners are able to request KYC verification, which if successful gives them theKYCLevelofREGULARand the ability to request payouts.PLATFORM– Single specific user that represents the platform. ThePLATFORMvalue is only assigned by Mangopay and may be used as part of the validated workflow implemented by the platform.
string
Returned values: ACTIVE, CLOSEDInternal use only. This field can only be used and updated by Mangopay teams.
[
{
"Id": "158026537",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670863988,
"PersonType": "LEGAL",
"Email": "richard.moulin@email.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": false,
"TermsAndConditionsAcceptedDate": null,
"UserCategory": "PAYER",
"UserStatus": "ACTIVE"
},
{
"Id": "158025445",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670862022,
"PersonType": "NATURAL",
"Email": "email@test.com",
"KYCLevel": "LIGHT",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670862022,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
},
{
"Id": "158026721",
"Tag": "Created using MANGOPAY API Collection Postman",
"CreationDate": 1670864174,
"PersonType": "LEGAL",
"Email": "cortney_douglas@yahoo.com",
"KYCLevel": "REGULAR",
"TermsAndConditionsAccepted": true,
"TermsAndConditionsAcceptedDate": 1670864174,
"UserCategory": "OWNER",
"UserStatus": "ACTIVE"
}
]
// GET has no body parameters
<?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 {
$response = $api->Users->GetAll();
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-mangopay-client-id',
clientApiKey: 'your-mangopay-api-key',
})
const listUsers = async () => {
return await mangopay.Users.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listUsers()
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 listAllUsers()
begin
response = MangoPay::User.fetch()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch Users #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listAllUsers()
import com.mangopay.MangoPayApi;
import com.mangopay.core.Address;
import com.mangopay.core.Pagination;
import com.mangopay.core.Sorting;
import com.mangopay.core.enumerations.SortDirection;
import com.mangopay.entities.User;
import java.lang.reflect.Field;
import java.util.List;
public class ListAllUsers {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Pagination pagination = new Pagination(1, 100);
Sorting sort = new Sorting();
sort.addField("CreationDate", SortDirection.desc);
List<User> users = mangopay.getUserApi().getAll(pagination, sort);
for (User user : users) {
user = mangopay.getUserApi().get(user.getId());
System.out.println("\nid: " + user.getId());
printObjectFields(user);
}
}
private static void printObjectFields(Object obj) {
Class<?> objClass = obj.getClass();
Field[] fields = objClass.getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
Object value = field.get(obj);
if (value instanceof Address) {
System.out.println(field.getName() + ": ");
printObjectFields(value);
} else {
System.out.println(field.getName() + ": " + value);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
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 User
users = User.all(page=1, per_page=50)
for user in users:
pprint(vars(user))
using MangoPay.SDK;
using MangoPay.SDK.Entities;
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 sort = new Sort();
sort.AddField("CreationDate", SortDirection.desc);
var users = await api.Users.GetAllAsync(new Pagination(1, 20), sort);
string prettyPrint = JsonConvert.SerializeObject(users, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I