Create customer
Customers API

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

Creates a simple minimal representation of a customer in the Mollie API to use for the Mollie Checkout and Recurring features. These customers will appear in your Dashboard where you can manage their details, and also see their payments and subscriptions.

Parameters

name
string

Optional – The full name of the customer.

email
string

Optional – The email address of the customer.

locale
string

Optional – 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 fr_BE fr_FR nl_BE nl_NL

metadata
object

Optional – 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.

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

201
application/json; charset=utf-8

A customer object is returned, as described in Get customer.

Example

Request code

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

$customer = $mollie->customers->create([
    "name"  => "Customer A",
    "email" => "customer@example.com",
]);

Response

HTTP/1.1 201 Created
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"
}