Get customer

Customers API v2
GEThttps://api.mollie.com/v2/customers/*id*

Retrieve a single customer by its ID.

Parameters

Replace id in the endpoint URL by the customer’s ID, for example cst_8wmqcHMN4U.

Access token parameters

If you are using organization access tokens or are creating an OAuth app, you can enable test mode through the testmode query string parameter.

testmodebooleanoptional

Response

200 application/hal+json

resourcestring
Indicates the response contains a customer object. Will always contain customer for this endpoint.
idstring
The customer’s unique identifier, for example cst_vsKJpSsabw.
modestring

The mode used to create this customer.

Possible values: live test

namestring
The full name of the customer as provided when the customer was created.
emailstring
The email address of the customer as provided when the customer was created.
localestring

Allows you to preset the language to be used in the hosted payment pages shown to the consumer. If this parameter was not provided when the customer was created, the browser language will be used instead in the payment flow (which is usually more accurate).

Possible values: en_US en_GB nl_NL nl_BE fr_FR fr_BE de_DE de_AT de_CH es_ES ca_ES pt_PT it_IT nb_NO sv_SE fi_FI da_DK is_IS hu_HU pl_PL lv_LV lt_LT

metadatamixed
Data provided during the customer creation.
createdAtdatetime
The customer’s date and time of creation, in ISO 8601 format.
_linksobject

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

Show child parameters

selfURL object
The API resource URL of the customer itself.
dashboardURL object
Direct link to the Customer in the Mollie Dashboard.
mandatesURL object
The API resource URL of the mandates belonging to the Customer, if there are no mandates this parameter is omitted.
subscriptionsURL object
The API resource URL of the subscriptions belonging to the Customer, if there are no subscriptions this parameter is omitted.
paymentsURL object
The API resource URL of the payments belonging to the Customer, if there are no payments this parameter is omitted.
documentationURL object
The URL to the customer retrieval endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/customers/cst_kEn1PlbGa \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
$customer = $mollie->customers->get("cst_kEn1PlbGa");
1
2
3
4
5
6
from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXs")

customer = mollie_client.customers.get("cst_8wmqcHMN4U")
1
2
3
4
5
6
7
require 'mollie-api-ruby'

Mollie::Client.configure do |config|
  config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM'
end

customer = Mollie::Customer.get('cst_8wmqcHMN4U')
1
2
3
4
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

const customer = await mollieClient.customers.get('cst_kEn1PlbGa');

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/hal+json

{
    "resource": "customer",
    "id": "cst_kEn1PlbGa",
    "mode": "test",
    "name": "Customer A",
    "email": "customer@example.org",
    "locale": "nl_NL",
    "metadata": null,
    "createdAt": "2018-04-06T13:23:21.0Z",
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/customers/cst_kEn1PlbGa",
            "type": "application/hal+json"
        },
        "dashboard": {
            "href": "https://www.mollie.com/dashboard/org_123456789/customers/cst_kEn1PlbGa",
            "type": "text/html"
        },
        "mandates": {
            "href": "https://api.mollie.com/v2/customers/cst_kEn1PlbGa/mandates",
            "type": "application/hal+json"
        },
        "subscriptions": {
            "href": "https://api.mollie.com/v2/customers/cst_kEn1PlbGa/subscriptions",
            "type": "application/hal+json"
        },
        "payments": {
            "href": "https://api.mollie.com/v2/customers/cst_kEn1PlbGa/payments",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/customers-api/get-customer",
            "type": "text/html"
        }
    }
}