Create, retrieve, and list Mollie payment captures.
All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.
Capture creation accepts a caller-owned idempotency key. The SDK never generates idempotency keys implicitly.
{:ok, capture} =
MollieEx.Captures.create(
client,
"tr_123",
%{amount: %{currency: "EUR", value: "10.00"}},
idempotency_key: "7da9444e-4360-4ab4-b411-73b33ac52b1f"
)
Summary
Functions
Creates a capture for an authorized Mollie payment.
Retrieves a Mollie capture by payment ID and capture ID.
Lists Mollie captures for a payment.
Types
@type create_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type create_params() :: map()
@type get_option() :: {:embed, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type list_option() :: {:from, String.t()} | {:limit, pos_integer()} | {:embed, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
Functions
@spec create(MollieEx.Client.t(), String.t(), create_params(), [create_option()]) :: {:ok, MollieEx.Capture.t()} | {:error, MollieEx.Error.t()}
Creates a capture for an authorized Mollie payment.
Capture creation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec get(MollieEx.Client.t(), String.t(), String.t(), [get_option()]) :: {:ok, MollieEx.Capture.t()} | {:error, MollieEx.Error.t()}
Retrieves a Mollie capture by payment ID and capture ID.
@spec list(MollieEx.Client.t(), String.t(), [list_option()]) :: {:ok, MollieEx.List.t(MollieEx.Capture.t())} | {:error, MollieEx.Error.t()}
Lists Mollie captures for a payment.