Create customer

Customers API v1

Warning

The v1 API has been deprecated. The v1 API will be supported for the foreseeable future, at least until July 2023. However, new features will only be added to the v2 API.

The documentation for creating customers in the new v2 API can be found here. For more information on the v2 API, refer to our v2 migration guide.

POSThttps://api.mollie.com/v1/customers

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 Mollie Dashboard where you can manage their details, and also see their payments and subscriptions.

Parameters

namestringoptional
The full name of the customer.
emailstringoptional
The email address of the customer.
localestringoptional

Allows you to preset the language to be used in the hosted payment pages shown to the consumer. When this parameter is not provided, 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

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

Access token parameters

If you are using organization access tokens or are creating an OAuth app, the testmode parameter is also available.

testmodebooleanoptional

Response

201 application/json

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

Example

Request

1
2
3
4
curl -X POST https://api.mollie.com/v1/customers \
    -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" \
    -d "name=Customer A" \
    -d "email=customer@example.com"

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
HTTP/1.1 201 Created
Content-Type: application/json

{
    "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"
}