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": "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);
}