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

View Source

API calls for all endpoints tagged SettlementsAPI.

Summary

Functions

Get next settlement Retrieve the details of the current settlement, that has not yet been paid out. For a complete reference of the settlement object, refer to the Get settlement endpoint documentation. For more accurate bookkeeping, refer to the balance report endpoint or the balance transactions endpoint.

Get open settlement Retrieve the details of the open balance of the organization. This will return a settlement object representing your organization's balance. For a complete reference of the settlement object, refer to the Get settlement endpoint documentation. For more accurate bookkeeping, refer to the balance report endpoint or the balance transactions endpoint.

Get settlement Retrieve a single settlement by its ID. To lookup settlements by their bank reference, replace the ID in the URL by a reference. For example: 1234567.2404.03. A settlement represents a transfer of your balance funds to your external bank account. Settlements will typically include a report that details what balance transactions have taken place between this settlement and the previous one. For more accurate bookkeeping, refer to the balance report endpoint or the balance transactions endpoint.

List settlement captures Retrieve all captures included in the given settlement. The response is in the same format as the response of the List captures endpoint.

List settlement chargebacks Retrieve all chargebacks 'deducted' from the given settlement. The response is in the same format as the response of the List chargebacks endpoint.

List settlement payments Retrieve all payments included in the given settlement. The response is in the same format as the response of the List payments endpoint. For capture-based payment methods such as Klarna, the payments are not listed here. Refer to the List captures endpoint endpoint instead.

List settlement refunds Retrieve all refunds 'deducted' from the given settlement. The response is in the same format as the response of the List refunds endpoint.

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

Functions

get_next_settlement(connection, opts \\ [])

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

Get next settlement Retrieve the details of the current settlement, that has not yet been paid out. For a complete reference of the settlement object, refer to the Get settlement endpoint documentation. For more accurate bookkeeping, refer to the balance report endpoint or the balance transactions endpoint.

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.EntitySettlement.t} on success
  • {:error, Tesla.Env.t} on failure

get_open_settlement(connection, opts \\ [])

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

Get open settlement Retrieve the details of the open balance of the organization. This will return a settlement object representing your organization's balance. For a complete reference of the settlement object, refer to the Get settlement endpoint documentation. For more accurate bookkeeping, refer to the balance report endpoint or the balance transactions endpoint.

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.EntitySettlement.t} on success
  • {:error, Tesla.Env.t} on failure

get_settlement(connection, settlement_id, opts \\ [])

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

Get settlement Retrieve a single settlement by its ID. To lookup settlements by their bank reference, replace the ID in the URL by a reference. For example: 1234567.2404.03. A settlement represents a transfer of your balance funds to your external bank account. Settlements will typically include a report that details what balance transactions have taken place between this settlement and the previous one. For more accurate bookkeeping, refer to the balance report endpoint or the balance transactions endpoint.

Parameters

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

list_settlement_captures(connection, settlement_id, opts \\ [])

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

List settlement captures Retrieve all captures included in the given settlement. The response is in the same format as the response of the List captures endpoint.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • settlement_id (String.t): Provide the ID of the related settlement.
  • 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.
    • :embed (String.t): This endpoint allows embedding related API items by appending the following values via the embed 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.ListSettlementCaptures200Response.t} on success
  • {:error, Tesla.Env.t} on failure

list_settlement_chargebacks(connection, settlement_id, opts \\ [])

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

List settlement chargebacks Retrieve all chargebacks 'deducted' from the given settlement. The response is in the same format as the response of the List chargebacks endpoint.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • settlement_id (String.t): Provide the ID of the related settlement.
  • 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.
    • :embed (String.t): This endpoint allows embedding related API items by appending the following values via the embed 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.ListSettlementChargebacks200Response.t} on success
  • {:error, Tesla.Env.t} on failure

list_settlement_payments(connection, settlement_id, opts \\ [])

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

List settlement payments Retrieve all payments included in the given settlement. The response is in the same format as the response of the List payments endpoint. For capture-based payment methods such as Klarna, the payments are not listed here. Refer to the List captures endpoint endpoint instead.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • settlement_id (String.t): Provide the ID of the related settlement.
  • 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.
    • :sort (Sorting): Used for setting the direction of the result set. Defaults to descending order, meaning the results are ordered from newest to oldest.
    • :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.ListSettlementPayments200Response.t} on success
  • {:error, Tesla.Env.t} on failure

list_settlement_refunds(connection, settlement_id, opts \\ [])

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

List settlement refunds Retrieve all refunds 'deducted' from the given settlement. The response is in the same format as the response of the List refunds endpoint.

Parameters

  • connection (MollieAPI.Connection): Connection to server
  • settlement_id (String.t): Provide the ID of the related settlement.
  • 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.
    • :embed (String.t): This endpoint allows embedding related API items by appending the following values via the embed 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.ListSettlementRefunds200Response.t} on success
  • {:error, Tesla.Env.t} on failure

list_settlements(connection, opts \\ [])

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

List settlements Retrieve a list of all your settlements. 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.
    • :balanceId (String.t): Provide the token of the balance to filter the settlements by. This is the balance token that the settlement was settled to.
    • :year (String.t): Provide the year to query the settlements. Must be used combined with month parameter
    • :month (String.t): Provide the month to query the settlements. Must be used combined with year parameter
    • :currencies (Currencies): Provides the currencies to retrieve the settlements. It accepts multiple currencies in a comma-separated format.
    • :"idempotency-key" (String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Returns

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