Create, retrieve, list, update, cancel, and release authorizations for Mollie payments.
All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.
Write operations accept caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
{:ok, payment} =
MollieEx.Payments.create(
client,
%{
description: "Order #123",
amount: %{currency: "EUR", value: "10.00"},
redirect_url: "https://example.com/checkout/return"
},
idempotency_key: "9f0f9a78-9d56-4d2b-a7b6-7fdb8cc7d5f3"
)
Summary
Functions
Cancels a Mollie payment by payment ID.
Creates a Mollie payment.
Retrieves a Mollie payment by payment ID.
Lists Mollie payments.
Releases the remaining authorization for a Mollie payment.
Updates a Mollie payment by payment ID.
Types
@type cancel_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type create_option() :: {:idempotency_key, String.t()} | {:include, String.t()} | {:profile_id, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type create_params() :: map()
@type get_option() :: {:include, String.t()} | {: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()} | {:sort, :asc | :desc | String.t()} | {:profile_id, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type release_authorization_option() :: {:idempotency_key, String.t()} | {:profile_id, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type update_option() :: {:idempotency_key, String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type update_params() :: map()
Functions
@spec cancel(MollieEx.Client.t(), String.t(), [cancel_option()]) :: {:ok, MollieEx.Payment.t()} | {:error, MollieEx.Error.t()}
Cancels a Mollie payment by payment ID.
Payment cancellation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec create(MollieEx.Client.t(), create_params(), [create_option()]) :: {:ok, MollieEx.Payment.t()} | {:error, MollieEx.Error.t()}
Creates a Mollie payment.
Payment creation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec get(MollieEx.Client.t(), String.t(), [get_option()]) :: {:ok, MollieEx.Payment.t()} | {:error, MollieEx.Error.t()}
Retrieves a Mollie payment by payment ID.
@spec list(MollieEx.Client.t(), [list_option()]) :: {:ok, MollieEx.List.t(MollieEx.Payment.t())} | {:error, MollieEx.Error.t()}
Lists Mollie payments.
@spec release_authorization(MollieEx.Client.t(), String.t(), [ release_authorization_option() ]) :: {:ok, :accepted} | {:error, MollieEx.Error.t()}
Releases the remaining authorization for a Mollie payment.
Authorization release supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec update(MollieEx.Client.t(), String.t(), update_params(), [update_option()]) :: {:ok, MollieEx.Payment.t()} | {:error, MollieEx.Error.t()}
Updates a Mollie payment by payment ID.
Payment updates support caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.