Skip to main content

Generate a client certificate

post/companies/{companyId}/clientCertificates

Generates a client certificate for secure communication with Adyen using mutual TLS (mTLS). Provide a certificate signing request (CSR). Adyen signs it and returns the client certificate.

The CSR must be generated by a key pair that meets the following criteria:

  • Key ownership: the CSR must be signed by the associated private key.
  • Key type: RSA with a minimum key size of 2048 bits, or ECC with a minimum key size of 224 bits.

A company account can have a maximum of 10 valid client certificates at a time.

The subject distinguished name (subjectDN) of the issued certificate is constructed by Adyen from the path companyId and the request apiCredential. The subject in your CSR is not used. The returned subjectDN has the format UID={apiCredential}-Company.{companyId},CN={apiCredential}-Company.{companyId},O=Company.{companyId}.

To make this request, your API credential must have the following roles:

  • Management API - Client certificates read and write
Endpoint destination URL
https://management-test.adyen.com/v3/companies/{companyId}/clientCertificates
Click to copy
companyIdstringRequired
Min length: 1
apiCredentialstringRequired
Min length: 1

The API Credential that you want to use this certificate with, in the format 'ws_@Company.'. NOTE: You must assign the DN on that specified API credential with the one from the generated client certificate. Accomplish this either through the Customer Area API Credential page or the PATCH endpoint for apiCredentials

certificateSigningRequeststringRequired
Min length: 1

Certificate signing request. Must be a Base64-encoded DER string. Only the public key is enrolled; see the enroll operation for subject handling.

After submitting a call, you receive a response message to inform you that your request was received and processed.

Depending on the HTTP status code of the response message, it is helpful to build some logic to handle any errors that a request or the system may return.

HTTP Responses

  • 201 - Created

    Client certificate was generated successfully.

  • 400 - Bad Request

    The provided CSR is malformed or of an incorrect format.

  • 401 - Unauthorized

    The API credential used in the request is invalid.

  • 403 - Forbidden

    Insufficient permissions to process the request.

  • 422 - Unprocessable Entity

    A request validation error: missing or invalid request fields, a certificate signing request that does not meet our requirements, or the company has reached its limit of 10 client certificates.

  • 429 - Too Many Requests

    Request rate limit exceeded.

  • 500 - Internal Server Error

    An unrecoverable error occurred while trying to perform the request.