Refund or cancel card transfers.
Moov offers two mechanisms: the original refunds sub-resource, and the
newer, more flexible reversals sub-resource which can both cancel an
uncaptured/unsettled transfer and refund a settled one. New integrations
should generally prefer create_reversal/3.
Summary
Functions
Creates a refund via the original refunds sub-resource.
Cancels or refunds a card transfer via the reversals sub-resource.
Retrieves a single refund.
Lists refunds issued against a transfer.
Functions
@spec create(Moov.Client.t(), String.t(), String.t(), map()) :: {:ok, map()} | {:error, Moov.Error.t()}
Creates a refund via the original refunds sub-resource.
params: %{amount: %{currency: "USD", value: 500}} for a partial
refund, or omit :amount to refund the full amount.
@spec create_reversal(Moov.Client.t(), String.t(), String.t(), map()) :: {:ok, map()} | {:error, Moov.Error.t()}
Cancels or refunds a card transfer via the reversals sub-resource.
params: %{amount: %{currency: "USD", value: 500}} for a partial
refund, or omit :amount to refund/cancel the full amount.
@spec get(Moov.Client.t(), String.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Moov.Error.t()}
Retrieves a single refund.
@spec list(Moov.Client.t(), String.t(), String.t(), keyword()) :: {:ok, [map()]} | {:error, Moov.Error.t()}
Lists refunds issued against a transfer.