Mollie.Customers.Mandates (mollie v0.7.2)
Mandates allow you to charge a customer’s credit card, PayPal account or bank account recurrently.
It is only possible to create mandates for IBANs and PayPal billing agreements with this API. To create mandates for credit cards, have your customers perform a ‘first payment’ with their credit card.
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
create(client, customer_id, body)
Specs
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
Example
Mollie.Customers.Mandates.create client, "cst_8wmqcHMN4U", mandate_body
More info at: https://docs.mollie.com/reference/v2/mandates-api/create-mandate
find(client, customer_id, id, params \\ %{})
Specs
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
Example
Mollie.Customers.Mandates.find client, "cst_8wmqcHMN4U", "mdt_pWUnw6pkBN"
More info at: https://docs.mollie.com/reference/v2/mandates-api/get-mandate
list(client, customer_id, params \\ %{})
Specs
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
Example
Mollie.Customers.Mandates.list client, "cst_8wmqcHMN4U"
More info at: https://docs.mollie.com/reference/v2/mandates-api/list-mandates
revoke(client, customer_id, id, params \\ %{})
Specs
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
Example
Mollie.Customers.Mandates.revoke client, "cst_8wmqcHMN4U", "mdt_pWUnw6pkBN"
More info at: https://docs.mollie.com/reference/v2/mandates-api/revoke-mandate