Webhooks

List webhook subscriptions

get

Get a paginated list of webhook subscriptions with optional filtering

Authorizations
Query parameters
limitintegerOptional

Number of items to return

afterstringOptional

Cursor for forward pagination

beforestringOptional

Cursor for backward pagination

topicstring · enumOptional

Filter by webhook topic

Possible values:
is_activebooleanOptional

Filter by active status

Responses
200

OK

application/json
get
GET /webhooks HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "data": [
    {
      "created_at": "text",
      "endpoint_url": "text",
      "id": "text",
      "is_active": true,
      "partner_id": "text",
      "secret_last_4_digits": "text",
      "topic": "payout_paid",
      "updated_at": "text"
    }
  ],
  "end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
  "has_next_page": true,
  "has_previous_page": false,
  "start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}

Subscribe to a webhook

post

Subscribe to a webhook with the provided information

Authorizations
Body

Subscribe to a webhook

endpoint_urlstringOptional
secret_keystringOptional
topicstring · enumOptionalPossible values:
Responses
201

Created

application/json
post
POST /webhooks HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "endpoint_url": "text",
  "secret_key": "text",
  "topic": "payout_paid"
}
{
  "created_at": "text",
  "endpoint_url": "text",
  "id": "text",
  "is_active": true,
  "partner_id": "text",
  "secret_last_4_digits": "text",
  "topic": "payout_paid",
  "updated_at": "text"
}

Unsubscribe from a webhook

delete

Remove a webhook subscription by ID

Authorizations
Path parameters
subscription_idstringRequired

Subscription ID

Responses
200

OK

application/json
delete
DELETE /webhooks/{subscription_id} HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "created_at": "text",
  "endpoint_url": "text",
  "id": "text",
  "is_active": true,
  "partner_id": "text",
  "secret_last_4_digits": "text",
  "topic": "payout_paid",
  "updated_at": "text"
}

List webhook events

get

Get a paginated list of webhook events with optional filtering

Authorizations
Query parameters
limitintegerOptional

Number of items to return

afterstringOptional

Cursor for forward pagination

beforestringOptional

Cursor for backward pagination

topicstring · enumOptional

Filter by webhook topic

Possible values:
statusstring · enumOptional

Filter by event status

Possible values:
from_datestringOptional

Filter events created after this date (ISO 8601)

to_datestringOptional

Filter events created before this date (ISO 8601)

Responses
200

OK

application/json
get
GET /webhooks/events HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "data": [
    {
      "created_at": "text",
      "id": "text",
      "idempotency_key": "text",
      "partner_id": "text",
      "payload": null,
      "sent_at": "text",
      "sort_key": 1,
      "status": "pending",
      "topic": "payout_paid",
      "updated_at": "text"
    }
  ],
  "end_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH",
  "has_next_page": true,
  "has_previous_page": false,
  "start_cursor": "gaFpxBACEaXBVABEYbHG+X9LyLnH"
}

Retry failed webhooks

post

Retry all failed webhook events for the partner

Authorizations
Responses
200

OK

application/json
post
POST /webhooks/retry HTTP/1.1
Host: public-api.alternativepayments.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "text"
}

Was this helpful?