Customers API

Update an existing customer.

For an in-depth explanation of each parameter, refer to the Create customer endpoint.

patch/v2/customers/{customerId}

Request

  • Base URL
    https://api.mollie.com
  • URL
    https://api.mollie.com/v2/customers/{customerId}
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or OAuth 2
      Authorization code: https://my.mollie.com/oauth2/authorize
      Token URL: https://api.mollie.com/oauth2/tokens scopes: customers.write

Headers

idempotency-keystring
Example:123e4567-e89b-12d3-a456-426

A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Request body

resourcestring

Indicates the response contains a customer object. Will always contain the string customer for this endpoint.

idstring
mode'live' | 'test'

Whether this entity was created in live mode or in test mode.

namestring nullable

The full name of the customer.

emailstring nullable

The email address of the customer.

If the domain contains non-ASCII characters, encode it as Punycode per RFC 3492.

locale'ca_ES' | 'cs_CZ' | 'da_DK' | 'de_AT' | 'de_CH' | 'de_DE' | 'de_LU' | 'el_GR' | 'en_BE' | 'en_GB' | 'en_NL' | 'en_US' | 'es_ES' | 'fi_FI' | 'fr_BE' | 'fr_FR' | 'fr_LU' | 'hu_HU' | 'is_IS' | 'it_IT' | 'lt_LT' | 'lv_LV' | 'nb_NO' | 'nl_BE' | 'nl_NL' | 'pl_PL' | 'pt_PT' | 'sk_SK' | 'sl_SI' | 'sv_SE' | 'tr_TR' | 'null' nullable

Sets the language for customer-facing content and communications.

createdAtstring

The entity's date and time of creation, in ISO 8601 format.

testmodeboolean nullable

Whether the entity was created in test mode or live mode. This field does not update the mode of the entity.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

Example request

{
  "resource": "customer",
  "id": "cst_5B8cwPMGnU",
  "mode": "live",
  "name": "John Doe",
  "email": "example@email.com",
  "locale": "en_US",
  "createdAt": "2024-03-20T09:13:37+00:00",
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "dashboard": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "payments": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "mandates": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "subscriptions": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Response

The updated customer object.

resourcestring required

Indicates the response contains a customer object. Will always contain the string customer for this endpoint.

idstring required
mode'live' | 'test' required

Whether this entity was created in live mode or in test mode.

namestring nullable required

The full name of the customer.

emailstring nullable required

The email address of the customer.

If the domain contains non-ASCII characters, encode it as Punycode per RFC 3492.

locale'ca_ES' | 'cs_CZ' | 'da_DK' | 'de_AT' | 'de_CH' | 'de_DE' | 'de_LU' | 'el_GR' | 'en_BE' | 'en_GB' | 'en_NL' | 'en_US' | 'es_ES' | 'fi_FI' | 'fr_BE' | 'fr_FR' | 'fr_LU' | 'hu_HU' | 'is_IS' | 'it_IT' | 'lt_LT' | 'lv_LV' | 'nb_NO' | 'nl_BE' | 'nl_NL' | 'pl_PL' | 'pt_PT' | 'sk_SK' | 'sl_SI' | 'sv_SE' | 'tr_TR' | 'null' nullable required

Sets the language for customer-facing content and communications.

createdAtstring required

The entity's date and time of creation, in ISO 8601 format.

testmodeboolean nullable

Whether to create the entity in test mode or live mode.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

Example response

{
  "resource": "customer",
  "id": "cst_5B8cwPMGnU",
  "mode": "live",
  "name": "John Doe",
  "email": "example@email.com",
  "locale": "en_US",
  "createdAt": "2024-03-20T09:13:37+00:00",
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "dashboard": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "payments": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "mandates": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "subscriptions": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Changes

    • warning

      added the new el_GR enum value to the //// response property for the response status

    • warning

      added the new sl_SI enum value to the //// response property for the response status

    • warning

      added the new tr_TR enum value to the //// response property for the response status

    • info

      added the new el_GR enum value to the request property ////

    • info

      added the new sl_SI enum value to the request property ////

    • info

      added the new tr_TR enum value to the request property ////

    • warning

      added the new en_BE enum value to the //// response property for the response status

    • warning

      added the new en_NL enum value to the //// response property for the response status

    • info

      added the new en_BE enum value to the request property ////

    • info

      added the new en_NL enum value to the request property ////