Subscription APIs

A webhook subscription is a mechanism that allows one system (the destination) to receive automated, real-time HTTP notifications from another system (the source) about specific events. The destination system "subscribes" to particular events, and the source system sends an HTTP request (the webhook) to a predefined callback URL whenever those events occur.

This guide provides a comprehensive overview and API reference for managing webhook subscriptions. Developers can use the provided API endpoints to:



List all notification subscriptions

Retrieve a list of all active webhook subscriptions.

  • HTTP Method: GET
  • URL: /api/v1/notifications/subscriptions
  • Request Example:
curl --location 'https://harbor.owlpay.com/api/v1/notifications/subscriptions' \
--header 'X-API-KEY: ••••••'
  • Response Example:
{
    "data": [
        {
            "uuid": "sub_ade75cbc-46f3-4c87-902a-c6596a088968",
            "name": "Transactions Webhook",
            "endpoint": "https://example.com/webhook",
            "enabled": true,
            "notification_types": [
                "*"
            ],
            "restricted": false,
            "created_at": "2025-08-28T08:34:33.000000Z",
            "updated_at": "2025-08-28T08:34:33.000000Z"
        },
        {
            "uuid": "sub_ffc519bb-4819-48de-8483-441b5472bfc6",
            "name": "Transactions Webhook",
            "endpoint": "https://example.com/webhook",
            "enabled": true,
            "notification_types": [
                "*"
            ],
            "restricted": false,
            "created_at": "2025-08-28T08:36:17.000000Z",
            "updated_at": "2025-08-28T08:36:17.000000Z"
        },
        {
            "uuid": "sub_951ca83b-1330-4b7b-921a-a1c02f1345b5",
            "name": "Transactions Webhook",
            "endpoint": "https://example.com/webhook",
            "enabled": true,
            "notification_types": [
                "*"
            ],
            "restricted": false,
            "created_at": "2025-08-28T08:37:21.000000Z",
            "updated_at": "2025-08-28T08:37:21.000000Z"
        }
    ],
    "links": {
        "first": "http://harbor.owlpay.com/api/v1/notifications/subscriptions?page=1",
        "last": null,
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "current_page_url": "http://harbor.owlpay.com/api/v1/notifications/subscriptions?page=1",
        "from": 1,
        "path": "http://harbor.owlpay.com/api/v1/notifications/subscriptions",
        "per_page": 15,
        "to": 4
    }
}

Create a webhook subscription

Establish a new webhook subscription by specifying an endpoint URL and the desired notification types.

  • HTTP Method: POST
  • URL: /api/v1/notifications/subscriptions
  • Request Example:
curl --location 'https://harbor.owlpay.com/api/v1/notifications/subscriptions' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: ••••••' \
--data '{
    "endpoint" : "https://yourserver.com/webhook",
    "notification_types" :["*"]
}'
  • Response Example:
{
    "data": {
        "uuid": "sub_951ca83b-1330-4b7b-921a-a1c02f1345b5",
        "name": "Transactions Webhook",
        "endpoint": "https://yourserver.com/webhook",
        "enabled": true,
        "notification_types": ["*"],
        "restricted": false,
        "created_at": "2025-08-28T08:37:21.000000Z",
        "updated_at": "2025-08-28T08:37:21.000000Z"
    }
}

Get a notification subscription

Fetch detailed information about a specific webhook subscription using its unique identifier.

  • HTTP Method: GET
  • URL: /api/v1/notifications/subscriptions/:webhookSubscription_uuid
  • Request Example:
curl --location 'https://harbor.owlpay.com/api/v1/notifications/subscriptions/sub_951ca83b-1330-4b7b-921a-a1c02f1345b5' \
--header 'X-API-KEY: ••••••'
  • Response Example:
{
    "data": {
        "uuid": "sub_951ca83b-1330-4b7b-921a-a1c02f1345b5",
        "name": "Transactions Webhook",
        "endpoint": "https://yourserver.com/webhook",
        "enabled": true,
        "notification_types": ["*"],
        "restricted": false,
        "created_at": "2025-08-28T08:37:21.000000Z",
        "updated_at": "2025-08-28T08:37:21.000000Z"
    }
}


			{
    "data": {
        "uuid": "sub_951ca83b-1330-4b7b-921a-a1c02f1345b5",
        "name": "Transactions Webhook",
        "endpoint": "https://example.com/webhook",
        "enabled": true,
        "notification_types": ["*"],
        "restricted": false,
        "created_at": "2025-08-28T08:37:21.000000Z",
        "updated_at": "2025-08-28T08:37:21.000000Z"
    }
}

Delete a notification subscription

Remove a webhook subscription using its unique identifier.

  • HTTP Method: DELETE
  • URL: /api/v1/notifications/subscriptions/:webhookSubscription_uuid
  • Request Example:
curl --location --request DELETE 'https://harbor.owlpay.com/api/v1/notifications/subscriptions/sub_951ca83b-1330-4b7b-921a-a1c02f1345b5' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: ••••••' \
--data ''
  • Response Example:
{
    "message": "The webhook subscription was deleted successfully.",
    "data": null
}