GoCardless Webhooks API.
Provides access to the webhook delivery log — the record of every webhook GoCardless has attempted to deliver to your endpoint. Use this to inspect failed deliveries and retry them.
For webhook signature verification and event parsing, use the
GoCardlessClient.Webhooks module instead.
Example — retry a failed delivery
{:ok, %{items: webhooks}} = GoCardlessClient.Resources.Webhooks.list(client, %{
successful: false
})
Enum.each(webhooks, fn wh ->
{:ok, _} = GoCardlessClient.Resources.Webhooks.retry(client, wh["id"])
end)
Summary
Functions
@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, [map()]} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Eagerly collects all webhook delivery records into a list.
@spec get(GoCardlessClient.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Retrieves a single webhook delivery record by ID.
@spec list(GoCardlessClient.Client.t(), map(), keyword()) :: {:ok, %{items: [map()], meta: map()}} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Returns a page of webhook delivery records.
Filter by :created_at[gte], :created_at[lte], :is_test.
@spec retry(GoCardlessClient.Client.t(), String.t(), map(), keyword()) :: {:ok, map()} | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}
Retries delivery of a webhook to your endpoint.
@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()
Returns a lazy Stream over all pages of webhook delivery records.