Skip to main content

Webhooks

Webhooks are a way for web applications to provide real-time notifications or data updates to other applications or services. It is a method of communication between two systems over the Internet. With webhooks, the AppDirect platform can send notifications to specific URLs when certain events occur in the system. Marketplace Managers can use the UI or API to configure webhooks. For example, you can configure to receive notifications when users are created, products are modified, or subscriptions are canceled.

Typically, in a webhook setup, one application or service (often referred to as the sender) triggers an event or performs an action. This event could be anything from a new user registration, a new post being published, or a status update on an order. Instead of the sender actively notifying or polling the receiver for updates, it sends an HTTP POST request to a predefined URL (known as the webhook endpoint) associated with the receiver.

The receiver, typically an application or service that wants to be notified of such events, provides the webhook endpoint. When the sender triggers an event, it sends an HTTP POST request containing relevant data to the receiver's webhook endpoint. The receiver then receives the request, processes the data, and takes appropriate actions based on the received information.

Webhooks are flexible and can be implemented using HTTP/HTTPS protocols, JSON or XML data formats, and secure authentication mechanisms like OAuth or API keys. The specific implementation details depend on the systems involved and the requirements of the integration. AppDirect webhooks strictly use the JSON format.

Integration process

At a high level, the webhook integration process consists of the following steps:

  1. Set up your destination URL, which will receive the notifications.
  2. Create webhooks. Marketplace managers create webhooks and choose the system events that generate notifications.
  3. Receive the notifications at the URL when events occur, and use the information in the notifications to integrate with your external systems.
  4. Send information back to your external systems. This depends on the use case, the external system/application, integration practices, and the system architecture. As these factors vary, AppDirect cannot provide specific guidance.

AppDirect webhooks only work in one direction, which is from the AppDirect platform to the endpoint. While you can use webhooks to receive information from AppDirect, it is not possible touse them to send information back to AppDirect.

note

Webhooks send notifications after an event occurs. For example, the REMOVED subscription webhook is sent only after a subscription is canceled. Accordingly, for REMOVED or DELETED events, the deleted resource is not included in the payload because AppDirect does not guarantee that the resource exists after deletion.

Was this page helpful?