Create, retrieve, and list Mollie payment links.
All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.
Payment link creation accepts a caller-owned idempotency key. The SDK never generates idempotency keys implicitly.
{:ok, payment_link} =
MollieEx.PaymentLinks.create(
client,
%{
description: "Order #123",
amount: %{currency: "EUR", value: "10.00"}
},
idempotency_key: "fc1693c0-b788-46f5-9d08-61eac31d5ab8"
)
Summary
Functions
Creates a Mollie payment link.
Retrieves a Mollie payment link by ID.
Lists Mollie payment links.
Types
@type create_option() :: {:idempotency_key, 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() :: {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type list_option() :: {:from, String.t()} | {:limit, pos_integer()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
Functions
@spec create(MollieEx.Client.t(), create_params(), [create_option()]) :: {:ok, MollieEx.PaymentLink.t()} | {:error, MollieEx.Error.t()}
Creates a Mollie payment link.
Payment link creation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec get(MollieEx.Client.t(), String.t(), [get_option()]) :: {:ok, MollieEx.PaymentLink.t()} | {:error, MollieEx.Error.t()}
Retrieves a Mollie payment link by ID.
@spec list(MollieEx.Client.t(), [list_option()]) :: {:ok, MollieEx.List.t(MollieEx.PaymentLink.t())} | {:error, MollieEx.Error.t()}
Lists Mollie payment links.