Klarna for mobile app
Last updated: August 7, 2026
Accept Klarna payments on your app with Flow for mobile, our pre-built, customizable payment user interface that you can embed directly into your mobile application. Flow enables you to accept payments using Checkout.com's global network of payment methods with a single integration.
- The customer opens the checkout screen.
- You perform a server-side request to create a payment session.
- You use the payment session data on the client side to create and render Flow for mobile.
- Flow for mobile displays the available payment methods to the customer. When the customer selects Klarna, Flow renders Klarna's widget, powered by the Klarna Mobile SDK, where the customer reviews and authorizes the payment.
- If Klarna requires an out-of-app step, for example logging in to their bank or the Klarna app, it switches out of your app and returns to it using the return URL you configured.
- Flow for mobile completes the payment request and handles any additional actions required.
- You receive a webhook notifying you of the payment status.
Make sure you have a test account with Checkout.com.
Create a public key and a secret key from the Dashboard, with the following key scopes:
- Public key –
payment-sessions:payandvault-tokenization - Secret key –
payment-sessions
To receive webhooks for the payment events, configure your webhook server.
Integrate with Flow for mobile before continuing.
Ensure your merchant account has Klarna enabled. To enable Klarna, contact your account manager or request support.
Klarna availability, supported currencies, and supported billing countries vary by market. Confirm your Klarna coverage and the currency and country pairing you should send on the payment session.
Klarna ships as its own Gradle module, payment-methods-klarna.
In your project-level build.gradle, add the required repositories. The Klarna Mobile SDK isn't on Maven Central, so add Klarna's Maven repository. Scope the repository to the Klarna SDK groups with exclusiveContent, so it's only ever used to resolve Klarna artifacts:
1repositories {2mavenCentral()3maven { url = uri("https://jitpack.io") }4maven { url = uri("https://maven.fpregistry.io/releases") }56exclusiveContent {7forRepository {8maven { url = uri("https://x.klarnacdn.net/mobile-sdk/") }9}10filter {11includeGroup("com.klarna.mobile")12includeGroup("com.klarna.mobile.sdk")13}14}15}
In your app-level build.gradle, add the following dependencies:
1dependencies {2implementation('com.checkout:checkout-android-components:$latest_version')3implementation('com.checkout:checkout-android-components-payment-methods-klarna:$latest_version')4}
The Klarna Mobile SDK (com.klarna.mobile:sdk) is pulled in transitively by the payment-methods-klarna module.
When the customer is ready to pay, send a server-side request to securely create a PaymentSession object. The PaymentSession contains the information required to handle all steps of the payment flow.
Note
Do not embed your secret key in your client-side code.
Call the Create a Payment Session endpoint.
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/payment-sessions
In your request, provide the following:
customer.nameitems[], including thetotal_amountfor each itembilling.address.country, set to a Klarna-supported billing countrycurrency, set to the Klarna-supported currency for that country
Warning
Klarna only supports the local currency of each country. The currency value must map to the billing.address.country value. For example, if billing.address.country is SE, currency must be SEK. If any other value is used, including EUR, Klarna doesn't render as a payment option in Flow for mobile. For the full list of supported country and currency pairs, see Klarna's purchase countries, currencies, and locales documentation.
1{2"amount": 1000,3"currency": "EUR",4"reference": "ORD-123A",5"display_name": "Online shop",6"payment_type": "Regular",7"billing": {8"address": {9"country": "DE"10}11},12"customer": {13"name": "Jia Tsang",14"email": "jia.tsang@example.com"15},16"items": [17{18"reference": "0001",19"name": "Gold Necklace",20"quantity": 1,21"unit_price": 1000,22"total_amount": 100023}24],25"success_url": "https://example.com/payments/success",26"failure_url": "https://example.com/payments/failure"27}
1{2"id": "ps_2Un6I6lRpIAiIEwQIyxWVnV9CqQ",3"payment_session_secret": "pss_9823241e-2cec-4c98-b23d-7b29ow4e2e34"4}
The payment session response also determines which payment methods can be displayed to the customer. The response is determined by the customer's device and region.
Enable Klarna in Flow for mobile when creating a CheckoutComponents instance.
Pass Klarna.NAME when creating a flow or standalone component. Klarna.NAME is a pre-built PaymentMethodName("klarna") constant exposed by the SDK:
1import com.checkout.components.interfaces.component.ComponentOption2import com.checkout.components.paymentmethods.klarna.Klarna3import com.checkout.components.paymentmethods.klarna.KlarnaConfiguration4import com.checkout.components.paymentmethods.klarna.configuration.CheckoutKlarnaTheme56// Include Klarna in a Flow component (renders all available payment methods)7val flow = checkoutComponents.create(ComponentName.Flow)89// Or create a standalone Klarna component10val klarnaComponent = checkoutComponents.create(11Klarna.NAME,12ComponentOption(13paymentMethodConfiguration = mapOf(14Klarna.NAME to Klarna.Configuration(15theme = CheckoutKlarnaTheme.LIGHT // LIGHT (default) or DARK16)17)18)19)
Render the component in Compose UI with Render() or in a View container with provideView().
If Klarna needs an out-of-app step, it returns to your app using the return URL you configured, and Flow for mobile completes the payment.
Depending on the payment outcome, Checkout.com redirects the customer to the success_url or failure_url you specified when you created the PaymentSession.
We send you a webhook notifying you of changes to the payment's status. Wait for the webhook callback before you start your order fulfillment process.
For payments submitted with Flow, the PaymentSession ID appears in the webhook payload's data.metadata.cko_payment_session_id field.