Create, retrieve, list, update, cancel, and inspect payments for Mollie subscriptions.
All functions return result tuples. They do not raise for ordinary API, transport, or validation failures.
Summary
Functions
Lists subscriptions across customers.
Cancels a customer subscription by ID.
Creates a subscription for a customer.
Retrieves a customer subscription by ID.
Lists subscriptions for a customer.
Lists payments generated for a subscription.
Updates a customer subscription by ID.
Types
@type all_option() :: {:from, String.t()} | {:limit, pos_integer()} | {:profile_id, String.t() | nil} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@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()} | {: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()} | {:sort, :asc | :desc | String.t()} | {:testmode, boolean()} | {:pool_timeout, pos_integer()} | {:receive_timeout, pos_integer()} | {:request_timeout, pos_integer()}
@type list_payments_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 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 all(MollieEx.Client.t(), [all_option()]) :: {:ok, MollieEx.List.t(MollieEx.Subscription.t())} | {:error, MollieEx.Error.t()}
Lists subscriptions across customers.
Pass profile_id: nil with organization-level credentials to omit a
configured client profile and list subscriptions across the organization.
@spec cancel(MollieEx.Client.t(), String.t(), String.t(), [cancel_option()]) :: {:ok, MollieEx.Subscription.t()} | {:error, MollieEx.Error.t()}
Cancels a customer subscription by ID.
Subscription cancellation supports caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.
@spec create(MollieEx.Client.t(), String.t(), create_params(), [create_option()]) :: {:ok, MollieEx.Subscription.t()} | {:error, MollieEx.Error.t()}
Creates a subscription for a customer.
Subscription 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.Subscription.t()} | {:error, MollieEx.Error.t()}
Retrieves a customer subscription by ID.
@spec list(MollieEx.Client.t(), String.t(), [list_option()]) :: {:ok, MollieEx.List.t(MollieEx.Subscription.t())} | {:error, MollieEx.Error.t()}
Lists subscriptions for a customer.
@spec list_payments(MollieEx.Client.t(), String.t(), String.t(), [ list_payments_option() ]) :: {:ok, MollieEx.List.t(MollieEx.Payment.t())} | {:error, MollieEx.Error.t()}
Lists payments generated for a subscription.
@spec update(MollieEx.Client.t(), String.t(), String.t(), update_params(), [ update_option() ]) :: {:ok, MollieEx.Subscription.t()} | {:error, MollieEx.Error.t()}
Updates a customer subscription by ID.
Subscription updates support caller-owned idempotency keys. The SDK never generates idempotency keys implicitly.