API credentials

To authenticate with Klarna, use your API credentials and HTTP basic auth.

The credentials consist of a username and a password:

  • The username consists of your Merchant ID (MID), a unique number that identifies your e-store, combined with a random string.
  • The password is a string associated with your MID and is used to authorize use of Klarna APIs.

Note: The API credentials are separate from your MID. It's possible to have several API credentials associated with the same MID.

The credentials should be sent as in the Authorization header for every request with the username and the password.

You receive both your live (production) and test (playground) credentials by contacting your regional Klarna merchant support team.

If the credentials are missing or wrong, Klarna responds with 401 Unauthorized. You can read more about HTTP Basic auth in the Wikipedia article.



To ensure your connection is secure, our endpoint supports HTTPS using TLS 1.2 (Transport Layer Security).

The client needs to use Server Name Indication (SNI) in the TLS handshake with the endpoint.