Klarna Docs - Sign in with Klarna mobile integration

Sign in with Klarna mobile integration

Integrate Sign in with Klarna into your mobile app.

Our mobile SDK offers two ways to integrate Sign in with Klarna into your app: 

  • A ready-made button with Klarna's styling, branding, and text. You just need to add this button to your view's hierarchy and configure it. The sign in flow is triggered when the user taps the button. Choose this option if you want to integrate Sign in with Klarna with the least amount of work.
  • An API that allows you to display your own UI control, then trigger the sign in flow when your user interacts with it. Choose this option if you want to have full control over the user experience.

This section outlines the steps you need to perform before starting the client-side integration.

You need to provide us with a valid redirect URL. This also needs to be provided when you set up the integration in the app and will be triggered when the sign in flow completes.

The redirect URL is used for two things: ensuring that the sign in flow is started from your app, and that the customer is returned to the right place.

The redirect URL must be formatted as a recognizable app schema.  


App schemaAcceptedExplanation
my-app-name⛔️Can be misread as host
my-app-✨⛔️Has invalid characters. Read more about valid URLs.

You can integrate the Sign in with Klarna button by following these steps:

  1. Create an instance of the button.
  2. Add the button to your screen.
  3. Implement the event handler to receive the results.

The Sign in with Klarna button requires you to set some parameters before rendering in your application. The mandatory parameters you need to set are the Client ID, scope, and market values. 

There are other optional parameters, for example, locale, shape, and others that you can override in the button's constructor/initializer or set after you create it.

Once you have created the button instance and set the parameters, you need to add it to your screen so it's visible to the customer in a way that they can interact with it. If you have set all the parameters correctly, the button will be rendered successfully.

Once the user completes the Sign in with Klarna flow, you will receive their profile information via the event handler you have implemented. You can then use these details to set up an account, link to an existing account, prefill the checkout, and give shoppers a personalized experience.