Update customer
Customers API

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

Update an existing customer.

Parameters

Replace id in the endpoint URL by the customer's ID, for example cst_stTC2WHAuS.

name
string

Optional – The new name of the customer.

email
string

Optional – The new email address of the customer.

locale
string

Optional – The new default locale for the customer, which determines which language is used in the payment screens shown to the consumer.

Possible values: en_US de_AT de_CH de_DE fr_BE fr_FR nl_BE nl_NL

metadata
object

Optional – The new JSON metadata. You can use up to 1kB of JSON.

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

The updated customer object is returned. The object fields are described in Get customer.

Example

Request code

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

$customer = $mollie->customers->get('cst_8wmqcHMN4U');
$customer->email = 'customer@example.org';

$mollie->customers->update($customer);

Response

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

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