MoneyHub.Payees (MoneyHub v1.0.0)

Copy Markdown View Source

Payee management for payments.

A payee must generally exist before a payment can be created against it. See Payee Management and Payments Overview. Creating a payee requires the payee:create scope.

Summary

Functions

Creates a payee. attrs typically includes "name" and an "accountIdentifications" list (sort code/account number, IBAN, etc).

Fetches a single payee by id.

Lists payees for the user identified by token.

Types

payee()

@type payee() :: map()

Functions

create(config, token, attrs)

@spec create(MoneyHub.Config.t(), String.t(), map()) ::
  {:ok, payee()} | {:error, MoneyHub.Error.t()}

Creates a payee. attrs typically includes "name" and an "accountIdentifications" list (sort code/account number, IBAN, etc).

delete(config, token, payee_id)

@spec delete(MoneyHub.Config.t(), String.t(), String.t()) ::
  :ok | {:error, MoneyHub.Error.t()}

Deletes a payee.

get(config, token, payee_id)

@spec get(MoneyHub.Config.t(), String.t(), String.t()) ::
  {:ok, payee()} | {:error, MoneyHub.Error.t()}

Fetches a single payee by id.

list(config, token)

@spec list(MoneyHub.Config.t(), String.t()) ::
  {:ok, [payee()]} | {:error, MoneyHub.Error.t()}

Lists payees for the user identified by token.