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

View Source

API calls for all endpoints tagged MethodsAPI.

Summary

Functions

Disable payment method Disable a payment method on a specific profile. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile.

Disable payment method issuer Disable an issuer for a payment method on a specific profile. Currently only the payment methods voucher and giftcard are supported. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile.

Enable payment method Enable a payment method on a specific profile. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile. Some payment methods require extra steps in order to be activated. In cases where a step at the payment method provider needs to be completed first, the status will be set to pending-external and the response will contain a link to complete the activation at the provider. To enable voucher or gift card issuers, refer to the Enable payment method issuer endpoint.

Enable payment method issuer Enable an issuer for a payment method on a specific profile. Currently only the payment methods voucher and giftcard are supported. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile.

Get payment method Retrieve a single payment method by its ID. If a method is not available on this profile, a 404 Not Found response is returned. If the method is available but not enabled yet, a status 403 Forbidden is returned. You can enable payments methods via the Enable payment method endpoint of the Profiles API, or via the Mollie Dashboard. If you do not know the method's ID, you can use the methods list endpoint to retrieve all payment methods that are available. Additionally, it is possible to check if wallet methods such as Apple Pay are enabled by passing the wallet ID (applepay) as the method ID.

List all payment methods Retrieve all payment methods that Mollie offers, regardless of the eligibility of the organization for the specific method. The results of this endpoint are not paginated — unlike most other list endpoints in our API. The list can optionally be filtered using a number of parameters described below. ℹ️ Note: This endpoint only returns online payment methods. If you wish to retrieve the information about a non-online payment method, you can use the Get payment method endpoint.

List payment methods Retrieve all enabled payment methods. The results of this endpoint are not paginated — unlike most other list endpoints in our API. For test mode, all pending and enabled payment methods are returned. If no payment methods are requested yet, the most popular payment methods are returned in the test mode. For live mode, only fully enabled payment methods are returned. Payment methods can be requested and enabled via the Mollie Dashboard, or via the Enable payment method endpoint of the Profiles API. The list can optionally be filtered using a number of parameters described below. By default, only payment methods for the Euro currency are returned. If you wish to retrieve payment methods which exclusively support other currencies (e.g. Twint), you need to use the amount parameters. ℹ️ Note: This endpoint only returns online payment methods. If you wish to retrieve the information about a non-online payment method, you can use the Get payment method endpoint.

Functions

disable_method(connection, profile_id, method_id, opts \\ [])

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

Disable payment method Disable a payment method on a specific profile. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (ProfilesProfileIdMethodsMethodIdProfileIdParameter): Provide the ID of the related profile.
  • method_id (MethodId): Provide the ID of the related payment method.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

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

disable_method_issuer(connection, profile_id, method_id, issuer_id, opts \\ [])

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

Disable payment method issuer Disable an issuer for a payment method on a specific profile. Currently only the payment methods voucher and giftcard are supported. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (ProfilesProfileIdMethodsMethodIdProfileIdParameter): Provide the ID of the related profile.
  • method_id (MethodIdWithIssuer): Provide the ID of the related payment method.
  • issuer_id (String.t): Provide the ID of the related issuer.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

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

enable_method(connection, profile_id, method_id, opts \\ [])

Enable payment method Enable a payment method on a specific profile. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile. Some payment methods require extra steps in order to be activated. In cases where a step at the payment method provider needs to be completed first, the status will be set to pending-external and the response will contain a link to complete the activation at the provider. To enable voucher or gift card issuers, refer to the Enable payment method issuer endpoint.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (ProfilesProfileIdMethodsMethodIdProfileIdParameter): Provide the ID of the related profile.
  • method_id (MethodId): Provide the ID of the related payment method.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

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

enable_method_issuer(connection, profile_id, method_id, issuer_id, opts \\ [])

Enable payment method issuer Enable an issuer for a payment method on a specific profile. Currently only the payment methods voucher and giftcard are supported. When using a profile-specific API credential, the alias me can be used instead of the profile ID to refer to the current profile.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (ProfilesProfileIdMethodsMethodIdProfileIdParameter): Provide the ID of the related profile.
  • method_id (MethodIdWithIssuer): Provide the ID of the related payment method.
  • issuer_id (String.t): Provide the ID of the related issuer.
  • opts (keyword): Optional parameters
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.
    • :body (EnableMethodIssuerRequest):

Returns

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

get_method(connection, method_id, opts \\ [])

Get payment method Retrieve a single payment method by its ID. If a method is not available on this profile, a 404 Not Found response is returned. If the method is available but not enabled yet, a status 403 Forbidden is returned. You can enable payments methods via the Enable payment method endpoint of the Profiles API, or via the Mollie Dashboard. If you do not know the method's ID, you can use the methods list endpoint to retrieve all payment methods that are available. Additionally, it is possible to check if wallet methods such as Apple Pay are enabled by passing the wallet ID (applepay) as the method ID.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • method_id (MethodId): Provide the ID of the related payment method.
  • opts (keyword): Optional parameters
    • :locale (Locale): Response language
    • :currency (String.t): If provided, the minimumAmount and maximumAmount will be converted to the given currency. An error is returned if the currency is not supported by the payment method.
    • :profileId (String.t): The identifier referring to the profile you wish to retrieve the resources for. Most API credentials are linked to a single profile. In these cases the profileId must not be sent. For organization-level credentials such as OAuth access tokens however, the profileId parameter is required.
    • :include (String.t): This endpoint allows you to include additional information via the include query string parameter.
    • :sequenceType (SequenceType): Set this parameter to first to only return the methods that can be used for the first payment of a recurring sequence. Set it to recurring to only return methods that can be used for recurring payments or subscriptions.
    • :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.EntityMethodGet.t} on success
  • {:error, Tesla.Env.t} on failure

list_all_methods(connection, opts \\ [])

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

List all payment methods Retrieve all payment methods that Mollie offers, regardless of the eligibility of the organization for the specific method. The results of this endpoint are not paginated — unlike most other list endpoints in our API. The list can optionally be filtered using a number of parameters described below. ℹ️ Note: This endpoint only returns online payment methods. If you wish to retrieve the information about a non-online payment method, you can use the Get payment method endpoint.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :locale (Locale): Response language
    • :amount (Amount): If supplied, only payment methods that support the amount and currency are returned. Example: /v2/methods/all?amount[value]=100.00&amount[currency]=USD
    • :include (String.t): This endpoint allows you to include additional information via the include query string parameter.
    • :sequenceType (SequenceType): Set this parameter to first to only return the methods that can be used for the first payment of a recurring sequence. Set it to recurring to only return methods that can be used for recurring payments or subscriptions.
    • :profileId (String.t): The identifier referring to the profile you wish to retrieve the resources for. Most API credentials are linked to a single profile. In these cases the profileId must not be sent. For organization-level credentials such as OAuth access tokens however, the profileId parameter is required.
    • :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.ListAllMethods200Response.t} on success
  • {:error, Tesla.Env.t} on failure

list_methods(connection, opts \\ [])

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

List payment methods Retrieve all enabled payment methods. The results of this endpoint are not paginated — unlike most other list endpoints in our API. For test mode, all pending and enabled payment methods are returned. If no payment methods are requested yet, the most popular payment methods are returned in the test mode. For live mode, only fully enabled payment methods are returned. Payment methods can be requested and enabled via the Mollie Dashboard, or via the Enable payment method endpoint of the Profiles API. The list can optionally be filtered using a number of parameters described below. By default, only payment methods for the Euro currency are returned. If you wish to retrieve payment methods which exclusively support other currencies (e.g. Twint), you need to use the amount parameters. ℹ️ Note: This endpoint only returns online payment methods. If you wish to retrieve the information about a non-online payment method, you can use the Get payment method endpoint.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :sequenceType (SequenceType): Set this parameter to first to only return the enabled methods that can be used for the first payment of a recurring sequence. Set it to recurring to only return enabled methods that can be used for recurring payments or subscriptions.
    • :locale (Locale): Response language
    • :amount (Amount): If supplied, only payment methods that support the amount and currency are returned. Example: /v2/methods?amount[value]=100.00&amount[currency]=USD
    • :resource (MethodResourceParameter): ⚠️ We no longer recommend using the Orders API. Please refer to the Payments API instead. Indicate if you will use the result for the Create order or the Create payment endpoint. When passing the value orders, the result will include payment methods that are only available for payments created via the Orders API.
    • :billingCountry (String.t): The country taken from your customer's billing address in ISO 3166-1 alpha-2 format. This parameter can be used to check whether your customer is eligible for certain payment methods, for example for Klarna. Example: /v2/methods?resource=orders&billingCountry=DE
    • :includeWallets (MethodIncludeWalletsParameter): A comma-separated list of the wallets you support in your checkout. Wallets often require wallet specific code to check if they are available on the shoppers device, hence the need to indicate your support.
    • :orderLineCategories (LineCategories): A comma-separated list of the line categories you support in your checkout. Example: /v2/methods?orderLineCategories=eco,meal
    • :profileId (String.t): The identifier referring to the profile you wish to retrieve the resources for. Most API credentials are linked to a single profile. In these cases the profileId must not be sent. For organization-level credentials such as OAuth access tokens however, the profileId parameter is required.
    • :include (String.t): This endpoint allows you to include additional information via the include query string parameter.
    • :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.ListMethods200Response.t} on success
  • {:error, Tesla.Env.t} on failure