Counterparty data: the merchant/payee/payer identified behind a transaction, including logos, categories, and an explicit "is this a recognised business" check.
See Counterparties and Counterparties Check. This wraps the V3 counterparties API (V2 is deprecated by Moneyhub).
Summary
Functions
Checks whether a free-text name/identifier corresponds to a recognised counterparty/business - useful for validating a payee name before creating a payment.
Fetches a single counterparty by id.
Lists known counterparties for the user identified by token.
Types
@type counterparty() :: map()
Functions
@spec check(MoneyHub.Config.t(), String.t(), String.t()) :: {:ok, map()} | {:error, MoneyHub.Error.t()}
Checks whether a free-text name/identifier corresponds to a recognised counterparty/business - useful for validating a payee name before creating a payment.
@spec get(MoneyHub.Config.t(), String.t(), String.t()) :: {:ok, counterparty()} | {:error, MoneyHub.Error.t()}
Fetches a single counterparty by id.
@spec list(MoneyHub.Config.t(), String.t(), keyword()) :: {:ok, [counterparty()]} | {:error, MoneyHub.Error.t()}
Lists known counterparties for the user identified by token.