MollieAPI.Api.MandatesAPI (mollie_api v0.1.0-20260303)
View SourceAPI calls for all endpoints tagged MandatesAPI.
Summary
Functions
Create mandate Create a mandate for a specific customer. Mandates allow you to charge a customer's card, PayPal account or bank account recurrently. It is only possible to create mandates for IBANs and PayPal billing agreements with this endpoint. To create mandates for cards, your customers need to perform a 'first payment' with their card.
Get mandate Retrieve a single mandate by its ID. Depending on the type of mandate, the object will contain the customer's bank account details, card details, or PayPal account details.
List mandates Retrieve a list of all mandates. The results are paginated.
Revoke mandate Revoke a customer's mandate. You will no longer be able to charge the customer's bank account or card with this mandate, and all connected subscriptions will be canceled.
Functions
@spec create_mandate(Tesla.Env.client(), String.t(), keyword()) :: {:ok, MollieAPI.Model.MandateResponse.t()} | {:ok, MollieAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Create mandate Create a mandate for a specific customer. Mandates allow you to charge a customer's card, PayPal account or bank account recurrently. It is only possible to create mandates for IBANs and PayPal billing agreements with this endpoint. To create mandates for cards, your customers need to perform a 'first payment' with their card.
Parameters
connection(MollieAPI.Connection): Connection to servercustomer_id(String.t): Provide the ID of the related customer.opts(keyword): Optional parameters:"idempotency-key"(String.t): A unique key to ensure idempotent requests. This key should be a UUID v4 string.:body(MandateRequest):
Returns
{:ok, MollieAPI.Model.MandateResponse.t}on success{:error, Tesla.Env.t}on failure
@spec get_mandate(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, MollieAPI.Model.MandateResponse.t()} | {:ok, MollieAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Get mandate Retrieve a single mandate by its ID. Depending on the type of mandate, the object will contain the customer's bank account details, card details, or PayPal account details.
Parameters
connection(MollieAPI.Connection): Connection to servercustomer_id(String.t): Provide the ID of the related customer.mandate_id(String.t): Provide the ID of the related mandate.opts(keyword): Optional parameters:testmode(boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases thetestmodequery parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting thetestmodequery parameter totrue. 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.MandateResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_mandates(Tesla.Env.client(), String.t(), keyword()) :: {:ok, MollieAPI.Model.ListMandates200Response.t()} | {:ok, MollieAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
List mandates Retrieve a list of all mandates. The results are paginated.
Parameters
connection(MollieAPI.Connection): Connection to servercustomer_id(String.t): Provide the ID of the related customer.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.:testmode(boolean()): Most API credentials are specifically created for either live mode or test mode. In those cases thetestmodequery parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting thetestmodequery parameter totrue. 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.ListMandates200Response.t}on success{:error, Tesla.Env.t}on failure
@spec revoke_mandate(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:ok, MollieAPI.Model.ErrorResponse.t()} | {:error, Tesla.Env.t()}
Revoke mandate Revoke a customer's mandate. You will no longer be able to charge the customer's bank account or card with this mandate, and all connected subscriptions will be canceled.
Parameters
connection(MollieAPI.Connection): Connection to servercustomer_id(String.t): Provide the ID of the related customer.mandate_id(String.t): Provide the ID of the related mandate.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