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

View Source

API calls for all endpoints tagged ProfilesAPI.

Summary

Functions

Create profile Create a profile to process payments on. Profiles are required for payment processing. Normally they are created via the Mollie dashboard. Alternatively, you can use this endpoint to automate profile creation.

Delete profile Delete a profile. A deleted profile and its related credentials can no longer be used for accepting payments.

Get current profile Retrieve the currently authenticated profile. A convenient alias of the Get profile endpoint. For a complete reference of the profile object, refer to the Get profile endpoint documentation.

Get profile Retrieve a single profile by its ID.

List profiles Retrieve a list of all of your profiles. The results are paginated.

Update profile Update an existing profile. Profiles are required for payment processing. Normally they are created and updated via the Mollie dashboard. Alternatively, you can use this endpoint to automate profile management.

Functions

create_profile(connection, profile_request, opts \\ [])

Create profile Create a profile to process payments on. Profiles are required for payment processing. Normally they are created via the Mollie dashboard. Alternatively, you can use this endpoint to automate profile creation.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_request (ProfileRequest):
  • 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.ProfileResponse.t} on success
  • {:error, Tesla.Env.t} on failure

delete_profile(connection, profile_id, opts \\ [])

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

Delete profile Delete a profile. A deleted profile and its related credentials can no longer be used for accepting payments.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (String.t): Provide the ID of the related profile.
  • 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

get_current_profile(connection, opts \\ [])

@spec get_current_profile(
  Tesla.Env.client(),
  keyword()
) :: {:ok, MollieAPI.Model.ProfileResponse.t()} | {:error, Tesla.Env.t()}

Get current profile Retrieve the currently authenticated profile. A convenient alias of the Get profile endpoint. For a complete reference of the profile object, refer to the Get profile endpoint documentation.

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.

Returns

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

get_profile(connection, profile_id, opts \\ [])

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

Get profile Retrieve a single profile by its ID.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (String.t): Provide the ID of the related profile.
  • opts (keyword): Optional parameters
    • :testmode (boolean()): 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.ProfileResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_profiles(connection, opts \\ [])

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

List profiles Retrieve a list of all of your profiles. 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.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

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

update_profile(connection, profile_id, update_profile_request, opts \\ [])

Update profile Update an existing profile. Profiles are required for payment processing. Normally they are created and updated via the Mollie dashboard. Alternatively, you can use this endpoint to automate profile management.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • profile_id (String.t): Provide the ID of the related profile.
  • update_profile_request (UpdateProfileRequest):
  • 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.ProfileResponse.t} on success
  • {:error, Tesla.Env.t} on failure