Get customer¶
GET
https://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.
true
to retrieve a test mode customer.Response¶
200
application/hal+json
resource
stringcustomer
for this endpoint.id
stringcst_vsKJpSsabw
.mode
stringThe mode used to create this customer.
Possible values: live
test
name
stringemail
stringlocale
stringAllows 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
metadata
mixedcreatedAt
datetime_links
objectAn object with several URL objects relevant to the customer. Every URL object will contain an href
and a type
field.
self
URL objectdashboard
URL objectmandates
URL objectsubscriptions
URL objectpayments
URL objectdocumentation
URL objectExample¶
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" } } } |