MollieAPI.Api.PaymentLinksAPI (mollie_api v0.1.0-20260303)

View Source

API calls for all endpoints tagged PaymentLinksAPI.

Summary

Functions

Create payment link With the Payment links API you can generate payment links that by default, unlike regular payments, do not expire. The payment link can be shared with your customers and will redirect them to them the payment page where they can complete the payment. A payment will only be created once the customer initiates the payment.

Delete payment link Payment links which have not been opened and no payments have been made yet can be deleted entirely. This can be useful for removing payment links that have been incorrectly configured or that are no longer relevant. Once deleted, the payment link will no longer show up in the API or Mollie dashboard. To simply disable a payment link without fully deleting it, you can use the archived parameter on the Update payment link endpoint instead.

Get payment link Retrieve a single payment link by its ID.

Get payment link payments Retrieve the list of payments for a specific payment link. The results are paginated.

List payment links Retrieve a list of all payment links. The results are paginated.

Update payment link Certain details of an existing payment link can be updated.

Functions

create_payment_link(connection, opts \\ [])

@spec create_payment_link(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.PaymentLinkResponse.t()}
  | {:error, Tesla.Env.t()}

Create payment link With the Payment links API you can generate payment links that by default, unlike regular payments, do not expire. The payment link can be shared with your customers and will redirect them to them the payment page where they can complete the payment. A payment will only be created once the customer initiates the payment.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (CreatePaymentLinkRequest):

Returns

  • {:ok, MollieAPI.Model.PaymentLinkResponse.t} on success
  • {:error, Tesla.Env.t} on failure

delete_payment_link(connection, payment_link_id, opts \\ [])

@spec delete_payment_link(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Delete payment link Payment links which have not been opened and no payments have been made yet can be deleted entirely. This can be useful for removing payment links that have been incorrectly configured or that are no longer relevant. Once deleted, the payment link will no longer show up in the API or Mollie dashboard. To simply disable a payment link without fully deleting it, you can use the archived parameter on the Update payment link endpoint instead.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • payment_link_id (String.t): Provide the ID of the related payment link.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (DeletePaymentLinkRequest):

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_payment_link(connection, payment_link_id, opts \\ [])

@spec get_payment_link(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.PaymentLinkResponse.t()}
  | {:error, Tesla.Env.t()}

Get payment link Retrieve a single payment link by its ID.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • payment_link_id (String.t): Provide the ID of the related payment link.
  • opts (keyword): Optional parameters
    • :testmode (boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases the testmode query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.PaymentLinkResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_payment_links(connection, opts \\ [])

@spec list_payment_links(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, MollieAPI.Model.ListPaymentLinks200Response.t()}
  | {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

List payment links Retrieve a list of all payment links. The results are paginated.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :from (String.t): Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate the result set.
    • :limit (integer()): The maximum number of items to return. Defaults to 50 items.
    • :testmode (boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases the testmode query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true. Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

  • {:ok, MollieAPI.Model.ListPaymentLinks200Response.t} on success
  • {:error, Tesla.Env.t} on failure

update_payment_link(connection, payment_link_id, opts \\ [])

@spec update_payment_link(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MollieAPI.Model.ErrorResponse.t()}
  | {:ok, MollieAPI.Model.PaymentLinkResponse.t()}
  | {:error, Tesla.Env.t()}

Update payment link Certain details of an existing payment link can be updated.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • payment_link_id (String.t): Provide the ID of the related payment link.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (UpdatePaymentLinkRequest):

Returns

  • {:ok, MollieAPI.Model.PaymentLinkResponse.t} on success
  • {:error, Tesla.Env.t} on failure