Accept a Klarna payment
Learn how to accept Klarna, a global buy now, pay later payment method.
With Klarna, customers are redirected to their Klarna account during checkout. If you don’t already have an integration with Stripe, we recommend using Stripe Checkout to create a Stripe-hosted checkout page and configure payment methods in the Dashboard.
You can also use Elements with the Checkout Sessions API to build a customized checkout page on your website or build a mobile integration to authenticate the payment in a webview.
Note
Before you start the integration, make sure your account is eligible for Klarna by going to your Payment methods settings.
Checkout
Elements
Direct API
Mobile
Enable Klarna
Enable Klarna in your Dashboard. Stripe automatically displays Klarna to eligible customers using dynamic payment methods. If you have line_items in different currencies, you need to create separate Checkout Sessions.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
Test your integration
When testing your Checkout integration, select Klarna as the payment method and click the Pay button. In testing environments, you can then simulate different outcomes within Klarna’s redirect.
Note
Klarna uses cookies for session tracking. To test different customer locations, log out of the Klarna sandbox from the previous session and use the relevant triggers.
Below, we have specially selected test data for the currently supported customer countries. In a sandbox, Klarna approves or denies a transaction based on the supplied email address.
| Approved | Denied | |
|---|---|---|
| Date of Birth | 10-07-1970 | 03-05-1994 |
| First Name | Test | John |
| Last Name | Person-au | snow |
| Street | Wharf St | Silverwater Rd |
| House number | 4 | 1-5 |
| Postal Code | 4877 | 2128 |
| City | Port Douglas | Silverwater |
| Region | QLD | NSW |
| Phone | +61473752244 | +61473763254 |
For production testing, you can use an amount of 3500 in your local currency to test all Klarna payment options besides Financing. For example, if you want to test “Pay in 3” in Italy, you can use a transaction of 35.00 EUR.
Two-step authentication
Any six digit number is a valid two-step authentication code. Use 999999 for authentication to fail.
Repayment method
Inside the Klarna flow, you can use the following test values to try various repayment types:
| Type | Value |
|---|---|
| Direct Debit | the related setting |
| Bank transfer | Demo Bank |
| Credit Card | Number: 4111 1111 1111 1111 CVV: 123 Expiration: any valid date in the future |
| Debit Card | Number: 4012 8888 8888 1881 CVV: 123 Expiration: any valid date in the future |
