Get customer
Customers API

GET
https://api.mollie.nl/v1/customers/id
Authentication: API keys OAuth access tokens

Retrieve a created customer.

Parameters

Replace id in the endpoint URL by a full customer ID like cst_1234567.

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

200
application/json; charset=utf-8
resource
string

Indicates the response contains a customer object.

Possible values: customer

id
string

The customer's identifier, for example cst_1234567. The identifier is created uniquely per organization and cannot be used outside of its context.

mode
string

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

Possible values: live test

name
string | null

The full name of the customer.

email
string | null

The email address of the customer.

locale
string | null

Allow you to preset the language to be used in the payment screens shown to the consumer. When this parameter is not provided, the browser language will be used instead (which is usually more accurate). The input formats are: en (language) or en_US (language and region).

Possible values: en_US de_AT de_CH de_DE es_ES fr_BE fr_FR nl_BE nl_NL

metadata
object

Provide any data you like in JSON notation, and we will save the data alongside the customer. Whenever you fetch the customer with our API, we'll also include the metadata. You can use up to 1kB of JSON.

recentlyUsedMethods
string[]

Payment methods that the customer recently used for payments.

Possible values: banktransfer belfius bitcoin creditcard directdebit giftcard ideal inghomepay kbc mistercash paypal paysafecard sofort

createdDatetime
datetime

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

Example

Request code

$mollie = new Mollie_API_Client;
$mollie->setApiKey('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');

$customer = $mollie->customers->get("cst_kEn1PlbGa");

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "resource": "customer",
    "id": "cst_vsKJpSsabw",
    "mode": "test",
    "name": "Customer A",
    "email": "customer@example.org",
    "locale": "nl_NL",
    "metadata": null,
    "recentlyUsedMethods": [
        "creditcard",
        "ideal"
    ],
    "createdDatetime": "2016-04-06T13:23:21.0Z"
}