MoneyHub.StandingOrders (MoneyHub v1.0.0)

Copy Markdown View Source

Standing order creation and management via Payment Initiation.

Setup mirrors single payments: drive the user through MoneyHub.Auth with a mh:standing_order claim (MoneyHub.Claims.put_standing_order/2) and the standing_order scope, specifying frequency, start date, and optionally an end date or number of payments.

See Standing Order Requests and Standing Order Retrieve.

Summary

Functions

Cancels a standing order.

Fetches a standing order's current status by id.

Lists standing orders for the user identified by token.

Types

standing_order()

@type standing_order() :: map()

Functions

cancel(config, token, standing_order_id)

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

Cancels a standing order.

get(config, token, standing_order_id)

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

Fetches a standing order's current status by id.

list(config, token)

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

Lists standing orders for the user identified by token.