MoneyHub.PayFile (MoneyHub v1.0.0)

Copy Markdown View Source

Pay Files: bulk/batch payment submission - initiate many payments from a single account in one authorisation, instead of one MoneyHub.Payments authorisation per payment. Useful for payroll, supplier runs, or refund batches.

Like single payments, creating a pay file is driven through MoneyHub.Auth (the file contents are submitted alongside the consent request), then its progress is tracked by polling or via webhooks.

Summary

Functions

Fetches a pay file's current status by id.

Lists pay files for the user identified by token.

Lists the individual payment entries within a pay file, with their statuses.

Types

pay_file()

@type pay_file() :: map()

Functions

get(config, token, pay_file_id)

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

Fetches a pay file's current status by id.

list(config, token)

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

Lists pay files for the user identified by token.

list_payments(config, token, pay_file_id)

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

Lists the individual payment entries within a pay file, with their statuses.