GoCardlessClient.Resources.Institutions (GoCardlessClient v2.0.0)

Copy Markdown View Source

GoCardless Institutions API.

Lists banks and financial institutions available for Open Banking flows.

Example

# List all UK institutions
{:ok, %{items: banks}} = GoCardlessClient.Resources.Institutions.list(client, %{
  country_code: "GB"
})

# List institutions available for a specific Billing Request
{:ok, %{items: banks}} = GoCardlessClient.Resources.Institutions.list_for_billing_request(
  client, "BRQ123", %{country_code: "GB"}
)

Summary

Functions

Eagerly collects all institutions into a list.

Lists all available institutions for Open Banking flows.

Lists institutions relevant to a specific Billing Request.

Returns a lazy Stream over all pages of institutions.

Functions

collect_all(client, params \\ %{}, opts \\ [])

@spec collect_all(GoCardlessClient.Client.t(), map(), keyword()) ::
  {:ok, [map()]}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Eagerly collects all institutions into a list.

list(client, params \\ %{}, opts \\ [])

@spec list(GoCardlessClient.Client.t(), map(), keyword()) ::
  {:ok, %{items: [map()], meta: map()}}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Lists all available institutions for Open Banking flows.

Filter params

  • :country_code — ISO 3166-1 alpha-2, e.g. "GB", "DE", "FR" (recommended)

list_for_billing_request(client, billing_request_id, params \\ %{}, opts \\ [])

@spec list_for_billing_request(
  GoCardlessClient.Client.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, %{items: [map()], meta: map()}}
  | {:error, GoCardlessClient.APIError.t() | GoCardlessClient.Error.t()}

Lists institutions relevant to a specific Billing Request.

Returns only the institutions compatible with the billing request's currency and country. Pass :country_code to further filter the results.

stream(client, params \\ %{}, opts \\ [])

@spec stream(GoCardlessClient.Client.t(), map(), keyword()) :: Enumerable.t()

Returns a lazy Stream over all pages of institutions.