List customers

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

Retrieve all customers created.

The results are paginated. See pagination for more information.

Parameters

fromstringoptional
Used for pagination. Offset the result set to the customer with this ID. The customer with this ID is included in the result set as well.
limitintegeroptional
The number of customers to return (with a maximum of 250).

Access token parameters

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

testmodebooleanoptional

Response

200 application/hal+json

countinteger
The number of customers found in _embedded, which is either the requested number (with a maximum of 250) or the default number.
_embeddedobject

The object containing the queried data.

Hide child parameters

customersarray
An array of customer objects as described in Get customer.
_linksobject

Links to help navigate through the lists of customers. Every URL object will contain an href and a type field.

Show child parameters

selfURL object
The URL to the current set of customers.
previousURL object
The previous set of customers, if available.
nextURL object
The next set of customers, if available.
documentationURL object
The URL to the customers list endpoint documentation.

Example

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

// First page
$customers = $mollie->customers->page();

// Next page
$customers->next();
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_api_key('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM')

# First page
customers = mollie_client.customers.list()

# Next page
customers.get_next()
1
2
3
4
5
6
7
require 'mollie-api-ruby'

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

customers = Mollie::Customer.all
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  // First page
  let customers = await mollieClient.customers.page();

  // Next page
  customers = await customers.nextPage();
})();

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
40
41
42
43
44
45
46
47
48
49
50
51
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "count": 3,
    "_embedded": {
        "customers": [
            {
                "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"
                    },
                    "documentation": {
                        "href": "https://docs.mollie.com/reference/v2/customers-api/get-customer",
                        "type": "text/html"
                    }
                }
            },
            { },
            { }
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/customers",
            "type": "application/hal+json"
        },
        "previous": null,
        "next": {
            "href": "https://api.mollie.com/v2/customers?from=cst_stTC2WHAuS",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/customers-api/list-customers",
            "type": "text/html"
        }
    }
}