mollie v0.2.3 Mollie.Customers.Mandates

Link to this section Summary

Functions

Create a mandate for a specific customer

Retrieve a mandate by its ID and its customer’s ID. The mandate will either contain IBAN or credit card details, depending on the type of mandate

Retrieve all mandates for the given customer_id, ordered from newest to oldest. Results are paginated

Revoke a customer’s mandate. You will no longer be able to charge the consumer’s bank account or credit card with this mandate and all connected subscriptions will be canceled

Link to this section Functions

Link to this function create(client, customer_id, body)
create(Mollie.Client.t(), binary(), map()) :: Mollie.response()

Create a mandate for a specific customer.

Mandate body example

%{
  "method" => "directdebit",
  "consumerName" => "Piet Mondriaan",
  "consumerAccount" => "NL55INGB0000000000"
}

Example

Mollie.Customers.Mandates.create client, "cst_8wmqcHMN4U", mandate_body

More info at: https://docs.mollie.com/reference/v2/mandates-api/create-mandate

Link to this function find(client, customer_id, id, params \\ %{})
find(Mollie.Client.t(), binary(), binary(), map() | list()) ::
  Mollie.response()

Retrieve a mandate by its ID and its customer’s ID. The mandate will either contain IBAN or credit card details, depending on the type of mandate.

Example

Mollie.Customers.Mandates.find client, "cst_8wmqcHMN4U", "mdt_pWUnw6pkBN"

More info at: https://docs.mollie.com/reference/v2/mandates-api/get-mandate

Link to this function list(client, customer_id, params \\ %{})
list(Mollie.Client.t(), binary(), map() | list()) :: Mollie.response()

Retrieve all mandates for the given customer_id, ordered from newest to oldest. Results are paginated.

Example

Mollie.Customers.Mandates.list client, "cst_8wmqcHMN4U"

More info at: https://docs.mollie.com/reference/v2/mandates-api/list-mandates

Link to this function revoke(client, customer_id, id, params \\ %{})
revoke(Mollie.Client.t(), binary(), binary(), map() | list()) ::
  Mollie.response()

Revoke a customer’s mandate. You will no longer be able to charge the consumer’s bank account or credit card with this mandate and all connected subscriptions will be canceled.

Example

Mollie.Customers.Mandates.revoke client, "cst_8wmqcHMN4U", "mdt_pWUnw6pkBN"

More info at: https://docs.mollie.com/reference/v2/mandates-api/revoke-mandate