Skip to main content
Klarna via Adyen enables customers to pay using Klarna’s buy now, pay later options, processed through your Adyen connection. Klarna allows multiple payment options depending on the country in which the order is created.

Quick reference

OptionTypeDefaultDescription
buttonOptions.textstringCustom text next to the Klarna logo
checkout.options = {
  adyenKlarna: {
    buttonOptions: {
      text: 'Pay with Klarna',
    },
  },
};

Button customization

Customize the text displayed on the Klarna via Adyen payment button.
OptionTypeDefaultDescription
buttonOptions.textstringText displayed next to the Klarna logo. Replaces the default “Pay with” text.
adyenKlarna: {
  buttonOptions: {
    text: 'Pay with Klarna',
  },
}
Use button text that reflects the Klarna payment options available in your customer’s region (e.g., “Pay later with Klarna” if only offering Pay Later).

How it works

Klarna via Adyen uses a redirect-based payment flow:
  1. Customer selects Klarna as their payment method
  2. If multiple Klarna payment types are available, the customer selects one (e.g., Pay Now, Pay Later)
  3. Customer is redirected to Klarna to authorize the payment
  4. After authorization, the customer is redirected back to your checkout
If Klarna via Adyen only provides a single payment type for the customer’s context, no selection list is displayed. The Klarna button will show the available payment type directly.

Client session requirements

Klarna via Adyen requires specific data in the client session to process payments. Pass these when creating the client session on your server.
ParameterRequiredDescription
currencyCodeYes3-letter ISO 4217 currency code (e.g., USD, EUR, GBP)
order.lineItemsYesDetails of the line items of the order
order.countryCodeYesCountry code of the customer
customer.emailAddressNoPre-fills the Klarna payment form
customer.mobileNumberNoPre-fills the Klarna payment form
customer.shippingAddressNoPre-fills the Klarna payment form
customer.billingAddressNoPre-fills the Klarna payment form
When passing customer.billingAddress, ensure that Klarna has payment method categories configured for the given address. If Klarna is not supported for the given billing address, no Klarna button will be rendered.
Learn more about supported countries and currencies in the Klarna documentation.

Redirect configuration

Klarna via Adyen uses Primer’s redirect payment flow. By default, the SDK opens a popup overlay for the Klarna redirect. If popups are blocked or the user is in a WebView, it falls back to a full-page redirect. You can configure redirect behavior through the redirect options:
checkout.options = {
  redirect: {
    returnUrl: 'https://your-site.com/checkout/complete',
    forceRedirect: false,
  },
  adyenKlarna: {
    buttonOptions: {
      text: 'Pay with Klarna',
    },
  },
};
See redirect options for full configuration details.

Testing

Sandbox testing

Use Primer’s TEST environment to test Klarna via Adyen payments without processing real transactions. Visit the Klarna Sample Data Page for test credentials and sample customer data.

Production

No special configuration is required to go live — use your production credentials and ensure your Adyen account has Klarna enabled.

Troubleshooting

Possible causes:
  • Klarna via Adyen not configured in Primer Dashboard
  • Adyen connection not set up or Klarna not enabled on your Adyen account
  • Required client session data missing (currencyCode, order.lineItems, order.countryCode)
  • Klarna does not support the customer’s billing address or country
Debug steps:
  1. Check browser console for errors
  2. Verify ADYEN_KLARNA is in your enabledPaymentMethods (if specified)
  3. Verify all required client session parameters are provided
  4. Check that your Adyen account has Klarna enabled for the relevant markets
Possible causes:
  • Browser popup blocker is active
  • Running inside a WebView that blocks popups
Resolution: The SDK automatically falls back to a full-page redirect when popups are blocked. You can also force full-page redirect with redirect.forceRedirect: true.
Possible causes:
  • Klarna does not offer payment types for the customer’s country or order amount
  • Adyen configuration limits available Klarna payment types
Debug steps:
  1. Check Klarna’s supported countries and currencies
  2. Verify your Adyen account’s Klarna configuration
  3. Verify order amount meets Klarna’s minimum requirements

Complete example

<primer-checkout client-token="your-client-token"></primer-checkout>

<script type="module">
  import { loadPrimer } from '@primer-io/primer-js';

  loadPrimer();

  const checkout = document.querySelector('primer-checkout');
  checkout.options = {
    // Redirect configuration (applies to all redirect payment methods)
    redirect: {
      returnUrl: 'https://your-site.com/checkout/complete',
    },

    // Klarna via Adyen configuration
    adyenKlarna: {
      buttonOptions: {
        text: 'Pay with Klarna',
      },
    },
  };
</script>

See also

SDK options reference

All configuration options

Klarna options (direct)

Klarna direct integration options

Klarna documentation

Official Klarna documentation