List mandates¶
Mandates API v1
Warning
The v1 API has been deprecated. The v1 API will be supported for the foreseeable future, at least until July 2023. However, new features will only be added to the v2 API.
The documentation for listing mandates in the new v2 API can be found here. For more information on the v2 API, refer to our v2 migration guide.
GET
https://api.mollie.com/v1/customers/*customerId*/mandates
Authentication:API keysApp access tokens
Retrieve all mandates of a customer.
Parameters¶
Replace customerId
in the endpoint URL by the customer’s ID, for example cst_8wmqcHMN4U
.
offset
integeroptional
The number of mandates to skip.
count
integeroptional
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, the testmode
query string parameter is also available.
Set this to true to only retrieve test mode mandates.
Response¶
200
application/json
totalCount
integer
The total number of mandates available.
offset
integer
The number of skipped mandates as requested.
count
integer
The number of mandates found in
data
, which is either the requested number (with a maximum of 250) or the default
number.data
array
An array of mandate objects as described in Get mandate.
links
objectLinks to help navigate through the lists of mandates, based on the given offset.
previous
string
The previous set of mandates, if available.
next
string
The next set of mandates, if available.
first
string
The first set of mandates, if available.
last
string
The last set of mandates, if available.
Example¶
Request¶
1 2 | curl -X GET https://api.mollie.com/v1/customers/cst_8wmqcHMN4U/mandates \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
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 | HTTP/1.1 200 OK Content-Type: application/json { "totalCount": 2, "offset": 0, "count": 2, "data": [ { "resource": "mandate", "id": "mdt_pO2m5jVgMa", "mode": "test", "status": "valid", "method": "directdebit", "customerId": "cst_8wmqcHMN4U", "details": { "consumerName": "Hr E G H K\u00fcppers en\/of MW M.J. K\u00fcppers-Veeneman", "consumerAccount": "NL53INGB0618365937", "consumerBic": "INGBNL2A" }, "createdDatetime": "2016-04-13T11:32:38.0Z" }, { "resource": "mandate", "id": "mdt_qtUgejVgMN", "status": "valid", "method": "creditcard", "customerId": "cst_8wmqcHMN4U", "details": { "cardHolder": "John Doe", "cardNumber": "1234", "cardLabel": "Mastercard", "cardFingerprint": "fHB3CCKx9REkz8fPplT8N4nq", "cardExpiryDate": "2016-03-31" }, "createdDatetime": "2016-04-13T11:32:38.0Z" } ] } |