Create customer mandate
Mandates API
customerId
/mandates
Create a mandate for customer customerId
. Mandates allow you to charge a customer's credit card or
bank account recurrently.
It is currently 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 ID. For example:
/v1/customers/cst_7UhSN1zuXS/mandates
.
-
method
string -
Payment method of the mandate. Currently only
directdebit
is supported.Possible values:
directdebit
-
consumerName
string -
The consumer's name.
-
consumerAccount
string -
The consumer's IBAN.
-
consumerBic
string -
Optional – The consumer's bank's BIC / SWIFT code.
-
signatureDate
date -
Optional – The date when the mandate was signed.
-
mandateReference
string -
Optional – A custom reference
Mollie Connect/OAuth parameters
If you're creating an app with Mollie Connect/OAuth there are extra parameters you can use.
-
testmode
boolean -
Optional – Set this to
true
to make this mandate a test mandate.
Includes
Some endpoints allow you to indicate if you want more information to be included in the API response via the include
querystring parameter.
- No includes supported for this endpoint.
Response
A mandate object is returned, as described in Get customer's mandate.
Example
Request code
# Not implemented. Create a pull request: https://github.com/mollie/mollie-api-php
Response
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
{
"resource": "mandate",
"id": "mdt_pWUnw6pkBN",
"status": "valid",
"method": "directdebit",
"customerId": "cst_stTC2WHAuS",
"details": {
"consumerName": "Customer A",
"consumerAccount": "NL53INGB0000000000",
"consumerBic": "INGBNL2A"
},
"mandateReference": "YOUR-COMPANY-MD13804",
"createdDatetime": "2016-04-30T22:00:00.0Z"
}