List mandates

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

Retrieve all mandates for the given customerId, ordered from newest to oldest.

The results are paginated. See pagination for more information.

Parameters

Replace customerId in the endpoint URL by the customer’s ID, for example cst_8wmqcHMN4U.

fromstringoptional
Used for pagination. Offset the result set to the mandate with this ID. The mandate with this ID is included in the result set as well.
limitintegeroptional
The number of mandates to return (with a maximum of 250).

Access token parameters

If you are using organization access tokens or are creating an OAuth app, you can enable test mode through the testmode query string parameter.

testmodebooleanoptional

Response

200 application/json

countinteger
The number of mandates found in _embedded, which is either the requested number (with a maximum of 250) or the default number.
_embeddedobject

The object containing the queried data.

Hide child parameters

mandatesarray
An array of mandate objects as described in Get mandate.
_linksobject

Links to help navigate through the lists of mandates. Every URL object will contain an href and a type field.

Show child parameters

selfURL object
The URL to the current set of mandates.
previousURL object
The previous set of mandates, if available.
nextURL object
The next set of mandates, if available.
documentationURL object
The URL to the mandates list endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/mandates \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
5
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
$customer = $mollie->customers->get("cst_stTC2WHAuS");
$mandates = $customer->mandates();
1
2
3
4
5
6
from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_api_key('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')

mandates = mollie_client.customer_mandates.with_parent_id('cst_stTC2WHAuS').list()
1
2
3
4
5
6
7
8
require 'mollie-api-ruby'

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

customer = Mollie::Customer.get('cst_stTC2WHAuS')
mandates = customer.mandates
1
2
3
4
5
6
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  const mandates = await mollieClient.customers_mandates.page({ customerId: 'cst_stTC2WHAuS' });
})();

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "count": 5,
    "_embedded": {
        "mandates": [
            {
                "resource": "mandate",
                "id": "mdt_AcQl5fdL4h",
                "mode": "test",
                "status": "valid",
                "method": "directdebit",
                "details": {
                    "consumerName": "John Doe",
                    "consumerAccount": "NL55INGB0000000000",
                    "consumerBic": "INGBNL2A"
                },
                "mandateReference": null,
                "signatureDate": "2018-05-07",
                "createdAt": "2018-05-07T10:49:08+00:00",
                "_links": {
                    "self": {
                        "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/mandates/mdt_AcQl5fdL4h",
                        "type": "application/hal+json"
                    },
                    "customer": {
                        "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U",
                        "type": "application/hal+json"
                    },
                    "documentation": {
                        "href": "https://mollie.com/en/docs/reference/customers/create-mandate",
                        "type": "text/html"
                    }
                }
            },
            { },
            { },
            { },
            { }
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/mandates?limit=5",
            "type": "application/hal+json"
        },
        "previous": null,
        "next": {
            "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/mandates?from=mdt_AcQl5fdL4h&limit=5",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/mandates-api/revoke-mandate",
            "type": "text/html"
        }
    }
}