Create mandate

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

Create a mandate for a specific customer. Mandates allow you to charge a customer’s credit card or bank account recurrently.

It is only possible to create mandates for IBANs with this endpoint. To create mandates for credit cards, have your customers perform a ‘first payment’ with their credit card.

Parameters

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

method

string
required

Payment method of the mandate.

Possible values: directdebit

consumerName

string
required
The consumer’s name.

consumerAccount

string
required
The consumer’s IBAN.

consumerBic

string
optional
The consumer’s bank’s BIC.

signatureDate

date
optional
The date when the mandate was signed in YYYY-MM-DD format.

mandateReference

string
optional
A custom mandate reference.

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 create a test mode mandate.

Response

201 application/json; charset=utf-8

A mandate object is returned, as described in Get mandate.

Example

Request

1
2
3
4
5
6
7
8
curl -X POST https://api.mollie.com/v2/customers/cst_4qqhO89gsT/mandates \
    -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" \
    -d "method=directdebit" \
    -d "consumerName=John Doe" \
    -d "consumerAccount=NL55INGB0000000000" \
    -d "consumerBic=INGBNL2A" \
    -d "signatureDate=2018-05-07" \
    -d "mandateReference=YOUR-COMPANY-MD13804"

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
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
    "resource": "mandate",
    "id": "mdt_h3gAaD5zP",
    "status": "valid",
    "method": "directdebit",
    "details": {
        "consumerName": "John Doe",
        "consumerAccount": "NL55INGB0000000000",
        "consumerBic": "INGBNL2A"
    },
    "mandateReference": "YOUR-COMPANY-MD13804",
    "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/create-mandate",
            "type": "text/html"
        }
    }
}