The Hook object

Description

A webhook is a technical approach that allows Mangopay to submit a notification to other applications whenever a specific event occurs.

The Hook object allows you to receive notifications, to a URL you define, that are triggered by a specific event type. You can set up only one URL for each event type.

Best practice – Idempotent hook processing

The retry feature (i.e., new notification if your app was unreachable) can set the hook to INVALID. We strongly recommend you make your event processing idempotent to avoid receiving duplicate notifications for the same events.

Attributes

UrlstringOptional

Max. length: 255 characters

The URL to which the notification is sent.

StatusstringOptional

Returned values: DISABLED, ENABLED

Whether the hook is enabled or not.

ValiditystringOptional

Returned values: VALID, INVALID

Whether the hook is valid or not. Once INVALID (following unsuccessful retries) the hook must be disabled and re-enabled.

EventTypestringOptional

Returned values: An EventType listed in the event types list

The type of the event.

IdstringOptional

Max length: 128 characters (see data formats for details)

The unique identifier of the object.

TagstringOptional

Max. length: 255 characters

Custom data that you can add to this object.

CreationDateintegerOptional

Unix timestamp (UTC) of the date and time the object was created.

EmailstringOptional

Format: A valid email address

The Email address to which alerts are sent in case of consecutive failed notification attempts.

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.

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.