Skip to main content
GET
/
v2.01
/
{ClientId}
/
hooks
/
{HookId}
<?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 {
    $hookId = '198685419';

    $response = $api->Hooks->Get($hookId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
{
    "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": 1655991027
}  

Path parameters

HookId
string
The unique identifier of the hook.

Responses

Url
string
Max. length: 255 charactersThe URL to which the notification is sent.
Status
string
Returned values: DISABLED, ENABLEDWhether the hook is enabled or not.
Validity
string
Returned values: VALID, INVALIDWhether the hook is valid or not. Once INVALID (following unsuccessful retries) the hook must be disabled and re-enabled.
EventType
string
Returned values: An EventType listed in the event types listThe type of the event.
Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Tag
string
Max. length: 255 charactersCustom data that you can add to this object.
CreationDate
Unix timestamp
The date and time at which the object was created.
{
    "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": 1655991027
}  
<?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 {
    $hookId = '198685419';

    $response = $api->Hooks->Get($hookId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}  
I