What are Webhooks:

Webhooks facilitate real-time communication between our system and your application through callback URLs and event-driven data updates. Whenever an event occurs within your organization, we will deliver the corresponding event data directly to your specified target endpoint.

First step is to configure webhook endpoints on the Dashboard to be notified about events from Anchor. Each organisation can create multiple webhook endpoints for different types of events. All webhook endpoints must be configured with https URLs that accept POST requests with JSON payloads.

When a significant event occurs, Anchor generates an Event object. We then send a POST request to your endpoint, with the request body containing the API representation of the Event, such as:

{
  "data": {
    "id": "17314910010651037850-anc_py_et",
    "type": "payin.received",
    "attributes": {
      "createdAt": "2024-11-13T09:43:21.065172119"
    },
    "relationships": {
      "payIn": {
        "data": {
          "id": "17314909327443804742-anc_py",
          "type": "PayIn"
        }
      }
    }
  }
}



Note that you can make Event Subscriptions in the live API or in the sandbox. Sandbox Event Subscriptions will receive webhooks for Sandbox Events and vice versa.

Consuming Webhook Events

Individual events are intentionally minimal, containing only the essential information. This design ensures the API structure remains stable and avoids complex webhook migrations as the Anchor API evolves. If you need more details, such as the payin amount in the example above, you can make a GET request to the API to fetch the full resource. Use the relationship.data.type fields to identify which resource to retrieve.

Sending Related Resources

Webhook events also supports Included. This can be enabled when creating a webhook through the dashboard or API to allow Anchor to include all related resources as part of the event payload we send to your webhook.

This feature allows removes the need to make additional API calls to get details, for instance, the payin.received event will include the full payin resource.

Events are accessible for up to 30 days.

IP addresses

We currently send webhooks from these IP addresses:

18.133.55.102

Click on the link below to create a webhook.