Revoke mandate

Mandates API v2
DELETEhttps://api.mollie.com/v2/customers/*customerId*/mandates/*id*

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.

Parameters

Replace customerId in the endpoint URL by the customer’s ID, and replace id by the mandate’s ID. For example: /v2/customers/cst_stTC2WHAuS/mandates/mdt_pWUnw6pkBN.

Mollie Connect/OAuth parameters

If you’re creating an app with Mollie Connect/OAuth, the testmode parameter is also available.

testmode

boolean
optional
Set this to true to revoke a test mode mandate.

Response

204 No Content

Example

cURLPHPPythonRubyNode.js
1
2
curl -X DELETE https://api.mollie.com/v2/customers/cst_stTC2WHAuS/mandates/mdt_pWUnw6pkBN \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
5
6
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
$customer = $mollie->customers->get("cst_stTC2WHAuS");
$mandate = $customer->getMandate("mdt_pWUnw6pkBN");
$mandate->revoke();
1
2
3
4
5
6
7
require 'mollie-api-ruby'

Mollie::Client.configure do |config|
  config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM'
end

Mollie::Customer::Mandate.delete('mdt_pWUnw6pkBN', customer_id: 'cst_stTC2WHAuS')
1
2
3
4
5
6
7
8
9
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  const status = await mollieClient.customers_mandates.delete(
    'mdt_pWUnw6pkBN',
    { customerId: 'cst_stTC2WHAuS' }
  );
})();
1
2
3
4
We don't have a Python code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation

Response

1
HTTP/1.1 204 No Content