> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/webhooks/view-hook/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # View a Hook GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/hooks/{HookId} View a Hook Reference: https://docs.mangopay.com/api-reference/webhooks/view-hook ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL. ## Servers - `https://api.sandbox.mangopay.com` (Sandbox, default) - `https://api.mangopay.com` (Production) - `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox) - `https://api-mtls.mangopay.com` (mTLS Production) ## Request ### Path parameters - `ClientId` (string, required) — Platform's API account identifier, associated with the API key. - `HookId` (string, required) — The unique identifier of the hook. ## Response ### 200 Success - `Url` (string, optional) — Max. length: 255 characters The URL to which the notification is sent. - `Status` (string, optional) — **Returned values:** `DISABLED`, `ENABLED` Whether the hook is enabled or not. - `Validity` (string, optional) — **Returned values:** `VALID`, `INVALID` Whether the hook is valid or not. Once `INVALID` (following unsuccessful retries) the hook must be disabled and re-enabled. - `EventType` (string, optional) — **Returned values:** An `EventType` listed in the event types list The type of the event. - `Id` (string, optional) — Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details) The unique identifier of the object. - `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`. - `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created. - `Email` (string, optional) — Format: A valid email address The `Email` address to which alerts are sent in case of [consecutive failed notification attempts](/webhooks#notification-retries-and-failure). **Caution:** Mangopay may populate this property automatically if your platform had webhooks integrated in Production before April 2, 2026. If so, setting the `Email` on a single Hook stops this automatic population for any new Hooks you create - [read more](/webhooks#transition-from-default-email-april-2026). For all platforms, if this property is returned `null` then no alerts are sent but the Hook still becomes `INVALID` after 100 consecutive failed notifications. ## Examples **Response** ```json { "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, "Email": "tech@example.com" } ``` **SDK Code** ```python 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 Notification hook_id = 'hook_m_01HR4KJ27QBRPNZG351R3SBA0B' try: view_hook = Notification.get(hook_id) pprint(view_hook._data) except Notification.DoesNotExist: print('Hook {} does not exist.'.format(hook_id)) ``` ```javascript const mangopayInstance = require('mangopay4-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) let hook = { Id: '144086866', } const getHook = async (hookId) => { return await mangopay.Hooks.get(hookId) .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } getHook(hook.Id) ``` ```java package com.samples.Helpers.Webhooks; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.entities.Hook; public class ViewHook { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); var hookId = "hook_m_01J3JQ13F0M5NY83M1GZKVNS95"; Hook viewHook = mangopay.getHookApi().get(hookId); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(viewHook); System.out.println(prettyJson); } } ``` ```csharp 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 hookId = "hook_m_01J55XNB6X4A0VJJ8W8CP9V51D"; var viewHook = await api.Hooks.GetAsync(hookId); string prettyPrint = JsonConvert.SerializeObject(viewHook, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` ```php 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); } ``` ```ruby 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 viewHook(hookId) begin response = MangoPay::Hook.fetch(hookId) puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch Hook: #{error.message}" puts "Error details: #{error.details}" return false end end myHook = { Id: '194445815' } viewHook(myHook[:Id]) ```