Klarna Docs - Adding the Checkout SDK as a dependency

Adding the Checkout SDK as a dependency

The Payments SDK is available on our Maven Repository. Perform the following steps to add it to your application: Edit your application-level build.gradle file and add the following repository to your repositories section:

    repositories {
        maven {
            url 'https://x.klarnacdn.net/mobile-sdk/'
    implementation 'com.klarna.checkout:sdk:1.x.x'

Check out our git-hub page to find the latest version.

For more information check out the Klarna Checkout SDK Github repository.

Register an intent-filter for the Activity which will be hosting the checkout in your AndroidManifest.xml to support return URLs:

        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="<your-custom-scheme>" />
        <data android:host="<your-custom-host>" />

The hosting Activity should be using launchMode of type singleTask or singleTop to prevent a new instance from being created when returning from an external application.

<activity android:launchMode="singleTask|singleTop">

You can read more about how deeplinks and intent filters work on the Android Developers site.

The Checkout SDK will require access to the internet, as such, if you don’t explicitly declare access in your manifest, we will merge manifests to get access.