This section covers the installation, configuration, and management of the Klarna Payments App in VTEX. It includes step-by-step instructions for setting up Klarna as a payment provider, handling orders, and moving to production.
The Klarna Payments App integrates with VTEX, enabling Klarna as a payment option at checkout. This allows merchants to accept payments through Klarna and manage orders using basic Order Management functionalities, such as capturing payments, processing refunds, and canceling transactions.
The following diagram provide a detailed overview of how Klarna Payments functions within the VTEX platform.
To enable Klarna as a payment provider in your VTEX store, you must install the Klarna Payments App.
vtex install klarnapartnerglobal.klarna-payments@2.0.4
In VTEX Admin, navigate to Apps > Klarna Payments and click on 'Edit'
Navigate to KP app on VTEX
Select the region where your store operates (for example, North America, Europe).
VTEX KP app configuration - region selection
For the allow all countries toggle:
Allow all countries toggle ON
specific markets selection
Test Mode: Set depending on the Klarna environment you want to use:
Environment toggle
Click Save to apply the changes.
After installing Klarna Payments, you must add it as a payment provider in VTEX.
Go to VTEX Admin > Store Settings > Payments > Providers and click New Provider
Adding Klarna as payment provider on VTEX
Search and select KlarnaPayments.
Select Klarna Payments as provider
Enter the required credentials:
Entering Klarna API credentials on VTEX
Enter a name for you to easily identify the Klarna provider configuration.
Enter an easy to identify name to the Klarna provider configuration
The Enable test mode setting determines whether the provider configuration applies to the VTEX test environment or the VTEX production environment.
Enable test mode - Provider configuration -VTEX
Click Save to complete the setup.
Important!
Ensure that the Klarna credentials entered in the provider configuration match the Klarna environment selected in the Klarna Payments App. Using Playground credentials with the Production environment, or vice versa, will result in authentication errors.
Go to VTEX Admin > Store Settings > Settings > Payment Conditions and click the "+" button to add a new condition.
Adding a new payment condition
Look for Klarna and select it.
Select Klarna
Enter a name for the Klarna payment condition
Enter name for payment condition
Change the status to Active, this will enable Klarna in the checkout page.
Set to active
In Process with provider, select the provider configuration you created in the previous step.
Select Karna's provider configuration created in previous step
Click Save. Now Klarna should be displayed at checkout as payment option
Save
Testing is a crucial step in ensuring that the Klarna Payments App functions correctly on the VTEX platform. It's recommended to conduct thorough testing in the Playground environment, in test mode, before going live.
Feature | Test Environment (Playground) | Production Environment |
---|---|---|
Order processing time | Up to 60 minutes for test transactions to process in VTEX. | Around 30 seconds for live transactions. |
Auto-capture behavior | Orders are auto-captured in 24 hours unless manually captured. | Klarna follows standard capture rules. |
Credentials required | Playground API credentials must be used. | Production API credentials must be used. |
Payment processing | No actual money is exchanged. | Live payments with real funds. |
Before switching to production, confirm the following:
Once all steps are verified, Klarna Payments is ready to process live transactions.