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.

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 retrieve a test mode customer.

Response

200 application/hal+json; charset=utf-8

resource

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

id

string
The customer’s unique identifier, for example cst_vsKJpSsabw.

mode

string

The mode used to create this customer. Mode determines whether a customer is real (live mode) or a test customer.

Possible values: live test

name

string
The full name of the customer as provided when the customer was created.

email

string
The email address of the customer as provided when the customer was created.

locale

string

Allows you to preset the language to be used in the payment screens 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 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

metadata

object
Data provided during the customer creation in JSON notation.

createdAt

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

_links

object

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

self

URL object
The API resource URL of the customer itself.

mandates

URL object
The API resource URL of the mandates belonging to the Customer, if there are no mandates this parameter is omitted.

subscriptions

URL object
The API resource URL of the subscriptions belonging to the Customer, if there are no subscriptions this parameter is omitted.

payments

URL object
The API resource URL of the payments belonging to the Customer, if there are no payments this parameter is omitted.

documentation

URL object
The URL to the customer retrieval endpoint documentation.

Example

Request

1
2
curl -X GET https://api.mollie.com/v2/customers/cst_kEn1PlbGa \
    -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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
HTTP/1.1 200 OK
Content-Type: application/hal+json; charset=utf-8

{
    "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"
        },
        "mandates": {
            "href": "https://api.mollie.dev/v2/customers/cst_kEn1PlbGa/mandates",
            "type": "application/hal+json"
        },
        "subscriptions": {
            "href": "https://api.mollie.dev/v2/customers/cst_kEn1PlbGa/subscriptions",
            "type": "application/hal+json"
        },
        "payments": {
            "href": "https://api.mollie.dev/v2/customers/cst_kEn1PlbGa/payments",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/customers-api/get-customer",
            "type": "text/html"
        }
    }
}