MollieEx.PaymentLinks (mollie_ex v0.2.0)

Copy Markdown View Source

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

create_option()

(since 0.1.0)
@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()}

create_params()

(since 0.1.0)
@type create_params() :: map()

get_option()

(since 0.1.0)
@type get_option() ::
  {:testmode, boolean()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

list_option()

(since 0.1.0)
@type list_option() ::
  {:from, String.t()}
  | {:limit, pos_integer()}
  | {:testmode, boolean()}
  | {:pool_timeout, pos_integer()}
  | {:receive_timeout, pos_integer()}
  | {:request_timeout, pos_integer()}

Functions

create(client, params, opts \\ [])

(since 0.1.0)
@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.

get(client, payment_link_id, opts \\ [])

(since 0.1.0)
@spec get(MollieEx.Client.t(), String.t(), [get_option()]) ::
  {:ok, MollieEx.PaymentLink.t()} | {:error, MollieEx.Error.t()}

Retrieves a Mollie payment link by ID.

list(client, opts \\ [])

(since 0.1.0)

Lists Mollie payment links.