Get mandate

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

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.

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_8wmqcHMN4U/mandates/mdt_pWUnw6pkBN.

Access token parameters

If you are using organization access tokens or are creating an OAuth app, the testmode query string parameter is also available.

testmode

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

Response

200 application/json

resource

string
Indicates the response contains a mandate object. Will always contain mandate for this endpoint.

id

string
The identifier uniquely referring to this mandate. Mollie assigns this identifier at mandate creation time. For example mdt_pWUnw6pkBN.

mode

string
The mode used to create this mandate.

status

string

The status of the mandate. Please note that a status can be pending for subscription mandates when there is no first payment. See our subscription guide.

Possible values: valid pending invalid

method

string

Payment method of the mandate.

Possible values: directdebit creditcard

details

object

The mandate detail object contains different fields per payment method.

For direct debit mandates, the following details are returned:

consumerName

string
The account holder’s name.

consumerAccount

string
The account holder’s IBAN.

consumerBic

string
The account holder’s bank’s BIC.

For credit card mandates, the following details are returned:

cardHolder

string
The credit card holder’s name.

cardNumber

string
The last four digits of the credit card number.

cardLabel

string

The credit card’s label. Note that not all labels can be processed through Mollie.

Possible values: American Express Carta Si Carte Bleue Dankort Diners Club Discover JCB Laser Maestro Mastercard Unionpay Visa null

cardFingerprint

string
Unique alphanumeric representation of the credit card, usable for identifying returning customers.

cardExpiryDate

date
Expiry date of the credit card in YYYY-MM-DD format.

mandateReference

string
The mandate’s custom reference, if this was provided when creating the mandate.

signatureDate

string
The signature date of the mandate in YYYY-MM-DD format.

createdAt

datetime
The mandate’s date and time of creation, in ISO 8601 format.

_links

object

An object with several URL objects relevant to the mandate. Every URL object will contain an href and a type field.

self

URL object
The API resource URL of the mandate itself.

customer

URL object
The API resource URL of the customer the mandate is for.

documentation

URL object
The URL to the mandate retrieval endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/customers/cst_4qqhO89gsT/mandates/mdt_h3gAaD5zP \
   -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_4qqhO89gsT");
$mandate = $customer->getMandate("mdt_h3gAaD5zP");
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
1
2
3
4
We don't have a Ruby 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
1
2
3
4
We don't have a Node.js 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
 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
HTTP/1.1 200 OK
Content-Type: application/json

{
    "resource": "mandate",
    "id": "mdt_h3gAaD5zP",
    "mode": "test",
    "status": "valid",
    "method": "directdebit",
    "details": {
        "consumerName": "John Doe",
        "consumerAccount": "NL55INGB0000000000",
        "consumerBic": "INGBNL2A"
    },
    "mandateReference": "YOUR-COMPANY-MD1380",
    "signatureDate": "2018-05-07",
    "createdAt": "2018-05-07T10:49:08+00:00",
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/customers/cst_4qqhO89gsT/mandates/mdt_h3gAaD5zP",
            "type": "application/hal+json"
        },
        "customer": {
            "href": "https://api.mollie.com/v2/customers/cst_4qqhO89gsT",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/mandates-api/get-mandate",
            "type": "text/html"
        }
    }
}