Get mandate¶
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 retrieving 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/*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
/v1/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.
true
to retrieve a test mode mandate.Response¶
200
application/json
resource
stringmandate
for this endpoint.id
stringmdt_pWUnw6pkBN
.mode
stringstatus
stringThe status of the mandate. A status can be pending
for mandates when the first payment is not yet finalized or
when we did not received the IBAN yet.
Possible values: valid
pending
invalid
method
stringPayment method of the mandate.
Possible values: directdebit
creditcard
paypal
customerId
stringcst_3RkSN1zuPE
.details
objectmandateReference
stringsignatureDate
stringYYYY-MM-DD
format.createdDatetime
datetimePayment method-specific details¶
The mandate detail object contains different fields per payment method.
Direct Debit¶
consumerName
stringconsumerAccount
stringconsumerBic
stringCredit Card¶
cardHolder
stringcardNumber
stringcardLabel
stringThe 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
stringcardExpiryDate
dateYYYY-MM-DD
format.PayPal¶
consumerName
stringconsumerAccount
stringExample¶
Request¶
1 2 | curl -X GET https://api.mollie.com/v1/customers/cst_4qqhO89gsT/mandates/mdt_h3gAaD5zP \ -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 | HTTP/1.1 200 OK Content-Type: application/json { "resource": "mandate", "id": "mdt_h3gAaD5zP", "mode": "test", "status": "valid", "method": "creditcard", "customerId": "cst_4qqhO89gsT", "details": { "cardHolder": "John Doe", "cardNumber": "1234", "cardLabel": "Mastercard", "cardFingerprint": "fHB3CCKx9REkz8fPplT8N4nq", "cardExpiryDate": "2016-03-31" }, "createdDatetime": "2016-04-13T11:32:38.0Z" } |