Integrate Sign in with Klarna into your website in 3 steps.
Begin by adding the
script tag to the
head section of your website's HTML source code.
Ensure that you specify the necessary attributes within the
|The url of the library provided by Klarna.
|The UUID you received after the Sign in with Klarna onboarding.
|The market or the country where this integration is available.
|A space-separated list of scopes you would like to request from the user. For example, you would request
billing_address if you need the billing address in your account creation.The claims of the requested scopes will be returned as part of JWT token
openid is always requested by default even if you don't pass it.
|The environment to which the integration is pointing.
|The name of the callback to be invoked once the user is authenticated.
|A callback function that will be triggered in case an error happens in the integration or the authorization flow.
|The language in which the Sign in with Klarna button is displayed to the user. If you don't specify this parameter, the language will match either the user's browser settings or the language associated with the market.
|Toggle overlay on Sign in with Klarna window.
|The URL of a page where user will be redirected after a login attempt. Please note that sensitive information will be embedded into the Redirect URL as search parameters. So, please be mindful while using third-party scripts on your Redirect page.
klarna-sign-in element inside the body tag of your desired website, at the location where you want the button to be displayed.
You can customize the appearance of the button by specifying values of the attributes within the
|The button’s color theme. Supported values are:
|The button's shape. Supported values are:
|Change alignment of the Klarna logo on the call to action button based on the provided configuration.
The callback response will provide you with the tokens corresponding to the logged-in user.
This token contains all the requested data points.
data-redirect-uri attribute is optional however it is highly recommended for the best user experience as popups can get blocked for various reasons.
The redirect page should contain:
Whitelisting the redirect pages
If you implemented the redirect page, please contact Klarna team to whitelist your redirect urls.