The Klarna Source Details object requires the following fields.
Field
Required/Optional
Description
returnUrl
Required
If you choose to utilize the full redirect flow, this is where your Customer will be redirected to after authorizing within the Klarna experience.
cancelUrl
Required
If you choose to utilize the full redirect flow, this is where your Customer will be redirected to after cancelling within the Klarna experience.
Step 2: Create a Klarna source using DigitalRiver.js
Use the DigitalRiver.js library to create and mount elements to the HTML container.
The address object must contain postal code and state/province data thatadheres to a standardized format using the state attribute. Note that the state attribute listed below corresponds to the countrySubdivision attribute used when providing address information. The payment session manages the correct field name on the backend.
Klarna source example
Step 3: Authorize the Klarna source
When you create a Klarna source, the customer is required to authorize the charge through Klarna. You can accomplish this by redirecting the customer to Klarna, where they will be presented with different payment options.
Redirecting the Customer to Klarna for authorization
To redirect your customer to Klarna for authorization, use the redirectUrl parameter in your createSource response.
At Klarna, the customer will be presented with the transaction details where they can authorize or cancel the transaction. If the authorization is successful, the customer will be redirected to the returnUrl parameter you specified when creating the source. If the customer cancels, they will be returned to the cancelURL parameter you specified when creating the source.
Note: To support recurring payments, use aklarnaCreditRecurring payment type in the createSource request. Only use the Klarna Recurring payment type for recurring payments. Klarna Recurring uses a different type of agreement with the lender, Klarna, to facilitate the recurring payments.
For standard payments, you must use the Klarna payment type.
Additional setup required: If you want to use Klarna, contact your Account Manager. The Account Manager will send setup instructions for Klarna Banners after you sign the client addendum.