<?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->Events->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-client-id',
clientApiKey: 'your-api-key',
})
const listEvents = async () => {
return await mangopay.Events.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listEvents()
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 listEvents()
begin
response = MangoPay::Event.fetch()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch events: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listEvents()
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.FilterEvents;
import com.mangopay.core.Pagination;
import com.mangopay.entities.Event;
import com.mangopay.core.enumerations.EventType;
public class ListEvents {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
FilterEvents eventsFilter = new FilterEvents();
eventsFilter.setType(EventType.PAYIN_NORMAL_CREATED);
List<Event> events = mangopay.getEventApi().get(eventsFilter, new Pagination(1, 100), null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(events);
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 Event
events = Event.all()
for event in events:
pprint(event._data)
print()
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 events = await api.Events.GetAllAsync(null);
string prettyPrint = JsonConvert.SerializeObject(events, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"ResourceId": "144085929",
"EventType": "UBO_DECLARATION_CREATED",
"Date": 1655891453
},
{
"ResourceId": "144086566",
"EventType": "KYC_CREATED",
"Date": 1655891893
}
]
Events
List all Events
GET
/
v2.01
/
{ClientId}
/
events
<?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->Events->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-client-id',
clientApiKey: 'your-api-key',
})
const listEvents = async () => {
return await mangopay.Events.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listEvents()
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 listEvents()
begin
response = MangoPay::Event.fetch()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch events: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listEvents()
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.FilterEvents;
import com.mangopay.core.Pagination;
import com.mangopay.entities.Event;
import com.mangopay.core.enumerations.EventType;
public class ListEvents {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
FilterEvents eventsFilter = new FilterEvents();
eventsFilter.setType(EventType.PAYIN_NORMAL_CREATED);
List<Event> events = mangopay.getEventApi().get(eventsFilter, new Pagination(1, 100), null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(events);
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 Event
events = Event.all()
for event in events:
pprint(event._data)
print()
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 events = await api.Events.GetAllAsync(null);
string prettyPrint = JsonConvert.SerializeObject(events, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"ResourceId": "144085929",
"EventType": "UBO_DECLARATION_CREATED",
"Date": 1655891453
},
{
"ResourceId": "144086566",
"EventType": "KYC_CREATED",
"Date": 1655891893
}
]
NoteEvents are returned up to 45 days after they occur. Any request attempting to access an event older than 45 days will result in an HTTP 400 - error.
Query parameters
string
required
Allowed values: An
EventType listed in the event types listThe type of the event.Unix timestamp
The date before which the event was created (based on the event’s
CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.Unix timestamp
The date after which the event was created (based on the event’s
CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.Responses
200
200
array
The list of events created by the platform.
Show properties
Show properties
object
The Event object created by the platform.
Show properties
Show properties
string
Max. length: 255 charactersThe unique identifier of the event.
Unix timestamp
The date and time the event occured.
string
Returned values: An
EventType listed in the event types listThe type of the event.400 - Events older than 45 days not retrievable
400 - Events older than 45 days not retrievable
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "9fb282aa-7c7e-462c-9f5c-df5f8714b39f",
"Date": 1715350291.0,
"errors": {
"AfterDate": "Events older than 45 days can not be searched",
"BeforeDate": "Events older than 45 days can not be searched"
}
}
[
{
"ResourceId": "144085929",
"EventType": "UBO_DECLARATION_CREATED",
"Date": 1655891453
},
{
"ResourceId": "144086566",
"EventType": "KYC_CREATED",
"Date": 1655891893
}
]
<?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->Events->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-client-id',
clientApiKey: 'your-api-key',
})
const listEvents = async () => {
return await mangopay.Events.getAll()
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listEvents()
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 listEvents()
begin
response = MangoPay::Event.fetch()
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch events: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
listEvents()
import java.util.List;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.FilterEvents;
import com.mangopay.core.Pagination;
import com.mangopay.entities.Event;
import com.mangopay.core.enumerations.EventType;
public class ListEvents {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
FilterEvents eventsFilter = new FilterEvents();
eventsFilter.setType(EventType.PAYIN_NORMAL_CREATED);
List<Event> events = mangopay.getEventApi().get(eventsFilter, new Pagination(1, 100), null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(events);
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 Event
events = Event.all()
for event in events:
pprint(event._data)
print()
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 events = await api.Events.GetAllAsync(null);
string prettyPrint = JsonConvert.SerializeObject(events, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I