<?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->Hooks->GetAll();
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
[
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "PAYIN_NORMAL_CREATED",
"Id": "hook_m_01J6EK0ZRRGKZH98RCDWB7Y3KJ",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1724919086
},
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "UBO_DECLARATION_VALIDATION_ASKED",
"Id": "hook_m_01J6EK16AS02MV3H4AMMXMQWZ1",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1701792699
}
]
<?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->Hooks->GetAll();
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
[
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "PAYIN_NORMAL_CREATED",
"Id": "hook_m_01J6EK0ZRRGKZH98RCDWB7Y3KJ",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1724919086
},
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "UBO_DECLARATION_VALIDATION_ASKED",
"Id": "hook_m_01J6EK16AS02MV3H4AMMXMQWZ1",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1701792699
}
]
200
Show properties
Show properties
DISABLED, ENABLEDWhether the hook is enabled or not.VALID, INVALIDWhether the hook is valid or not. Once INVALID (following unsuccessful retries) the hook must be disabled and re-enabled.EventType listed in the event types listThe type of the event.[
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "PAYIN_NORMAL_CREATED",
"Id": "hook_m_01J6EK0ZRRGKZH98RCDWB7Y3KJ",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1724919086
},
{
"Url": "https://example.com",
"Status": "ENABLED",
"Validity": "VALID",
"EventType": "UBO_DECLARATION_VALIDATION_ASKED",
"Id": "hook_m_01J6EK16AS02MV3H4AMMXMQWZ1",
"Tag": "Created using the Mangopay API Postman Collection",
"CreationDate": 1701792699
}
]
<?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->Hooks->GetAll();
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
Was this page helpful?