Manages webhook subscriptions (create/list/activate/deactivate/remove) via the notification self-service API.
For decrypting and verifying incoming webhook payloads, see
BankingCircle.Webhook.Verifier — that's a pure, network-free function
meant to run inside your Plug/Phoenix controller, not here.
Summary
Functions
Creates a subscription. attrs supports
In sandbox only: triggers a webhook notification without creating or mutating any underlying resource, so you can test your receiver's handling logic in isolation.
Types
@type client() :: atom()
Functions
@spec activate_subscription(String.t(), client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
@spec create_subscription(map(), client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
Creates a subscription. attrs supports:
:url(required) — your HTTPS receiver endpoint:encryption_key(required) — 32-character pre-shared AES-256-GCM key:event_types(required) — list of event type strings to subscribe to:active—trueto activate immediately (defaultfalse, i.e. created inactive so you can verify your receiver before flipping it on):email— notified on sustained delivery failure:max_notifications_per_message— batching size
@spec deactivate_subscription(String.t(), client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
@spec get_subscription(String.t(), client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
@spec list_subscriptions(client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
@spec remove_subscription(String.t(), client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
@spec simulate(String.t(), map(), client()) :: {:ok, map()} | {:error, BankingCircle.Error.t()}
In sandbox only: triggers a webhook notification without creating or mutating any underlying resource, so you can test your receiver's handling logic in isolation.