Using QuickPay v10 eSeller Cloud supports payments using Klarna. In order for the integration to work, a few things must be set up.
Setting up a payment form
A payment form must be set up restricted to Klarna payments. This is done by specifying “klarna” as the card type of the payment form. This means that the Klarna payment form will appear as a separate option in the list of payment forms in checkout.
This payment form should only be set up for the supported countries.
Country and currency
When creating Klarna payments, country and currency must “match” according to what is specified by QuickPay.
Required basket user values
For all Klarna payments, basket user values with the keys KlarnaInvoiceAddressStreet and KlarnaShippingAddressStreet must be created, containing the invoice and shipment address of the order. You only have to specify KlarnaShippingAddressStreet if a separate shipping address is specified.
If these basket user values do not exist or are empty, the payment will fail. A front-end script must grab the values from the eSeller address controls and post them to these basket user values.
Country-specific basket user values
House number
For some countries it is required that invoice/shipping address house number is specified in a separate field – this currently applies to Germany and Netherlands. This is not supported by eSeller Cloud, and thus this must be specified in basket user values.
A front-end script must get the addresses and split them into separate basket user values with keys KlarnaInvoiceAddressStreet and KlarnaInvoiceAddressHouseNumber for invoice address and KlarnaShippingAddressStreet and KlarnaShippingAddressHouseNumber for shipping address. You only have to specify KlarnaShippingAddressStreet and KlarnaShippingAddressHouseNumber if a separate shipping address is specified.
For other countries the house number basket user value can be omitted or left empty.
House extension
For some countries the invoice/shipping address house extension is supported, if it applies to the address (currently Netherlands).
In order to support this, a front-end script must get the address and split it into separate basket user values with the keys KlarnaInvoiceAddressHouseExtension and KlarnaShippingAddressHouseExtension. You only have to specify KlarnaShippingAddressHouseExtension if a separate shipping address is specified.
For other countries, the house extension basket user value can be omitted or left empty.
Additional shipping address fields
Klarna also requires shipping address phone number, shipping address mobile number and shipping address e-mail. Since these fields are not supported by eSeller Cloud, these fields are automatically filled with the corresponding values from the invoice address.