About Klarna Payments
General information about Klarna Payments
Klarna offers three different payment methods within the new Klarna KP API via Computop: Invoice and hire purchase (Pay Later & Pay over time) as well as Sofort + secured direct debit (Pay Now). Merchants pass on all the invoice data during the order to the service provider, who then takes over the complete billing and debtor management. That than takes over the complete billing and downstream debtor management. As merchant you get a payment guarantee; no matter what payment method the customer chooses. Thereby your customers get financial flexibility with Klarna, as they can choose themselves between invoice purchase and hire purchase. In the case of purchase by instalment merchants can also specify the instalment amounts and dates of repayment. Merchants can use the billing solution also for their B2B commerce.
Rate payment at the online shop motivates your customers to order high value baskets. This also increases your turnover. Klarna guarantees online consents in seconds for purchases by instalment during the order process. A PostIdent-process is not necessary. Klarna transfers the invoice amount to the merchant and bears the non-payment risk themselves. As merchant you benefit from rapidly available liquidity.
All three payment methods with restrictions of secured direct debit are available in the following countries with their respective domestic currency: Danmark (DKK), Germany (EUR), Finland (EUR), United Kingdom (GBP), Netherlands (EUR), Norway (NOK), Austria (EUR), Sweden (SEK) and USA (USD).
Further information can be found on Klarna's website (https://www.klarna.de).
Klarna Payments distinguishes between direct connection and the Klarna Hosted Payment Page (HPP).
Process flow chart direct connection
Process flow Klarna Payments direct connection
Process flow chart HPP
Process flow Klarna Payments direct connection
With direct connection a separate JavaScript widget is included for each payment method. With the HPP a complete checkout page will be displayed where all or some selected payment methods are displayed. Widgets as well as the HPP are loaded from a Klarna server.
Paygate interface
Format Description a alphabetical as alphabetical with special characters n numeric an alphanumeric ans alphanumeric with special characters ns numeric with special characters bool boolean expression (true or false) 3 fixed length with 3 digits/characters ..3 variable length with maximum 3 digits/characters enum enumeration of allowed values dttm ISODateTime (YYYY-MM-DDThh:mm:ss) Abbreviation Description CND condition M mandatory O optional C conditional Notice: Please note that the names of parameters can be returned in upper or lower case.Definitions
Data formats
Abbreviations
Comment If a parameter is mandatory, then it must be present If a parameter is optional, then it can be present, but it is not required If a parameter is conditional, then there is a conditional rule which specifies whether it is mandatory or optional
Create Klarna session for direct connection
Before Klarna widgets can be loaded a Klarna session must be created which returns an AccessToken. This AccessToken has to be used for loading the widgets. In order to start a Klarna session via server-to-server communication, please go to the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for creating a session with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for creating a session with Klarna Payments
Show Klarna widgets
Klarna uses widgets in order to show customers the possible payment methods. The available payment methods for selecting depend on the previously selected category (see Create Klarna Session, PayType). The widget integration is done with the AccessToken (see Create Klarna Session, AccessToken) and the Klarna JavaScript SDK. How to integrate and initialise the Klarna JavaScript SDK and how to load the widgets is described on Klarna webpage:
https://developers.klarna.com/documentation/klarna-payments/integration-guide/present-klarna-widget/ |
After successful authorisation you wil get an authorisation token (TokenExt) which has to be used for creating an order.
Create Klarna session for the HPP
In order to process a payment via Klarna HPP, please use the following URL:
https://www.computop-paygate.com/KlarnaPaymentsHPP.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for calling the Klarna HPP
The following table gives the result parameters which Computop Paygate transmits to URLSuccess or URLFailure and URLNotify. If you have specified the Response=encrypt parameter, the following parameters are sent Blowfish encrypted to your system: pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Result parameters for URLNotify, URLSuccess and URLFailure
Create order with Klarna
In order to create the order within Klarna system via a server-to-server connection, please use the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
If this is an initial order if a recurring order (RTF=I), then only the billing address can be submitted, not the delivery adress.
If the address data differs from the address data transferred from the JavaScript widget during authorization, the order will be rejected.
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for creating an order with Klarna
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for creating an order with Klarna
Create recurring order (Abo) with Klarna
In order to create a recurring order (e.g. Abo) with Klarna, please use the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for a recurring order (Abo) with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for a recurring order (Abo) with Klarna Payments
Modify invoice and delivery address
Invoice and delivery information was transferred within Klarna widget. As long as no capture is made invoice and/or delivery address can be modified subsequently. For this purpose please use the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for address modification with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for address modification with Klarna Payments
Modify unique reference number
As long as no capture is made the unique reference number which already was sent along within parameter RefNr for creating the Klarna session can be modified subsequently. For this purpose please use the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for modification of reference number with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for modification of reference number with Klarna Payments
Modify order amount and article list
As long as no capture is made the order amount as well as the whole article list can be modified subsequently. For this purpose please use the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for modifying order amount and article list with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for modification of order amount and article list with Klarna Payments
Capture
Captures are possible via a Server-to-Server connection. To carry out a complete or partial capture for Klarna Payments via a Server-to-Server connection please use the following URL:
https://www.computop-paygate.com/capture.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for captures with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for captures with Klarna Payments
Resending an activated invoice
It may happen that a customer hasn’t received the E-Mail with payment and order information. This request is possible only if a capture was already made. For resending this E-Mail, please use the following URL:
https://www.computop-paygate.com/KlarnaPayments.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameters for resending an activated invoice with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters for resending an activated invoice with Klarna Payments
Credit with reference and partial credit
Credits (refunds) are possible via a Server-to-Server connection. To carry out a partal or full credit with a reference transaction, please use the following URL:
https://www.computop-paygate.com/credit.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameter | Format | CND | Description | |
---|---|---|---|---|
MerchantID | ans..30 | M | MerchantID, assigned by Computop. Additionally this parameter has to be passed in plain language too. | |
PayID | an32 | M | ID assigned by Paygate for the payment to be credited | |
TransID | ans..64 | M | ID assigned by Merchant for the payment process to be credited | |
Amount | n..10 | M | Total amount to be credited in the smallest currency unit including taxes and rebates (e.g. EUR Cent). Please contact the helpdesk, if you want to capture amounts < 100 (smallest currency unit). Notice: It depends on the amount whether a full or partial credit is made. | |
Currency | a..3 | M | Currency, three characters DIN / ISO 4217, permitted are: AUD, CHF, DKK, EUR, GBP, NOK, SEK, USD. | |
RefNr | ns..30 | O | Unique reference number | |
ReqID | ans..32 | O | To avoid double payments, enter an alphanumeric value which identifies your transaction and may be assigned only once. If the transaction is submitted again with the same ReqID, Paygate will not carry out the payment, but will just return the status of the original transaction. Please note that the Paygate must have a finalized transaction status for the first initial action. Submissions with identical ReqID for an open status will be processed regularly. | |
ArticleList | ans..2048 | O | Complete article list of returned articles. This parameter must be created in JSON format. The individual parameters in JSON format are following: name = Product name (mandatory) quantity = item quantity. The value may not be negative. (mandatory) unit_price = unit price inclusive taxes but without rebates. (mandatory) total_amount = total amount of iarticles inclusive taxes and rebates. (mandatory) image_url = URL for an image that can be embedded later in agreement with Klarna. (max. 1024 characters) merchant_data = "pass-through parameter" (max. 255 characters). Merchant must agree with Klarna what will be transmitted here. product_identifiers.brand = product brand product_identifiers.category_path = path of product category. As separator '>' has to be used. product_identifiers.global_trade_item_number = article number (e.g. EAN, ISBN or UPC). product_identifiers.manufacturer_part_number = manufacturer’s number product_url = URL to product image quantity_unit = unit of quantity (e.g. kg) reference = article number (e.g. SKU) tax_rate = tax rate as percentage (e.g. 25%). The percent sign muss be replaced with two zeros, thus for example 2500. The value may not be negative. total_discount_amount = total amount of rebate. The value may not be negative. total_tax_amount = total amount of taxes. The value may be negative, if type is 'discount'. type = type of item position. Possible entries are <physical>, <discount>, <shipping_fee>, <sales_tax>, <digital>, <gift_card>, <store_credit>, <surcharge> Example: { "order_lines": [ { "image_url": "https://www.exampleobjects.com/logo.png", "merchant_data": "", "name": "Battery Power Pack", "product_identifiers": { "brand": "Intel", "category_path": "Electronics Store > Computers & Tablets > Desktops", "global_trade_item-number": "735858293167", "manufacturer_part_number": "BOXNUC5CPYH" }, "product_url": "https://www.estore.com/products/f2a8d7e34", "quantity": 1, "quantity_unit": "kg", "reference": "19-402-USA", "tax_rate": 0, "total_amount": 1000, "total_discount_amount": 0, "total_tax_amount": 0, "type": "physical", "unit_price": 1000 } ] } Afterwards the article list created in JSON format must be Base64 encoded. | |
MAC | an64 | M | Hash Message Authentication Code (HMAC) with SHA-256 algorithm |
Parameters for credits of payments with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Parameter | Format | CND | Description |
---|---|---|---|
MID | ans..30 | M | MerchantID, assigned by Computop |
PayID | an32 | M | ID assigned by Paygate for the payment, e.g. for referencing in batch files |
XID | an32 | M | ID for all single transactions (authorisation, capture, credit note) for one payment assigned by Paygate |
TransID | ans..64 | M | Merchant’s transaction number |
RefNr | ns..30 | O | Unique reference number |
Status | a..50 | M | OK or FAILED |
Description | ans..1024 | M | Further details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis! |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
InvoiceNr | ans..30 | M | Number of invoice/credit note from Klarna Payments |
CodeExt | ans..50 | O | Error code from Klarna, if agreed with Computop support |
ErrorText | ans..1024 | O | Error text from Klarna, if agreed with Computop support |
Response parameters for credits of payments with Klarna Payments
Reversal
Reversals are possible via a Server-to-Server connection. With this request merchants can reverse the total authorisation amount in case of no capture was made or can reverse the remaining authorisation amount if a partial capture was already made. For this purpose please use the following URL:
https://www.computop-paygate.com/reverse.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Parameter | Format | CND | Description | |
---|---|---|---|---|
MerchantID | ans..30 | M | MerchantID, assigned by Computop. Additionally this parameter has to be passed in plain language too. | |
PayID | an32 | M | ID assigned by Paygate for the payment to be reversed | |
TransID | ans..64 | M | Merchant ID for the identification of the payment process to be reversed | |
Amount | n..10 | M | Amount to be credited in the smallest currency unit including taxes and rebates (e.g. EUR Cent). Please contact the helpdesk, if you want to capture amounts < 100 (smallest currency unit). Notice: If no capture was made the amount must equals the previously authorised amount. If a partial capture already was made the amount must equals the remaining authorised amount. A reversal for an already completely captured order will be refused with an error also if an amount 0 is used. | |
Currency | a..3 | M | Currency, three characters DIN / ISO 4217, permitted are: AUD, CHF, DKK, EUR, GBP, NOK, SEK, USD. | |
RefNr | ans..30 | O | Unique reference number | |
MAC | an64 | M | Hash Message Authentication Code (HMAC) with SHA-256 algorithm | |
ReqID | ans..32 | O | To avoid double payments, enter an alphanumeric value which identifies your transaction and may be assigned only once. If the transaction is submitted again with the same ReqID, Paygate will not carry out the payment, but will just return the status of the original transaction. Please note that the Paygate must have a finalized transaction status for the first initial action. Submissions with identical ReqID for an open status will be processed regularly. |
Parameters for reversal of payments with Klarna Payments
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters
the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Parameter | Format | CND | Description |
---|---|---|---|
MID | ans..30 | M | MerchantID, assigned by Computop |
PayID | an32 | M | ID assigned by Paygate for the payment, e.g. for referencing in batch files |
XID | an32 | M | ID for all single transactions (authorisation, capture, credit note) for one payment assigned by Paygate |
TransID | ans..64 | M | Merchant’s transaction number |
RefNr | ns..30 | O | Unique reference number |
Status | a..50 | M | OK or FAILED |
Description | ans..1024 | M | Further details in the event that payment is rejected. Please do not use the Description but the Code parameter for the transaction status analysis! |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
CodeExt | ans..50 | O | Error code from Klarna, if agreed with Computop support |
ErrorText | ans..1024 | O | Error text from Klarna, if agreed with Computop support |
Response parameters for reversal of payments with Klarna Payments
Batch processing via the interface
Basic information about using Batch files and about their structure can be found in the Batch Manager manual. Within batch processing not alle functions are available which are usually available for the online interface.
This section describes the parameters which must be transferred within the data set (Record) for executing a payment with Klarna Payments and which information can be found within the response file about the payment status.
When capturing there is a need to differentiate between complete and partial activation requests. In the case of part capturing you need also to transfer the article list with <ArticleList>. The <ArticleList> parameter is also required if a partial credit is made on a full activation. The two parameters <ArticleList> and <InvNo> are also required in the case of a partial credit on a partial activation. All additional parameters are also returned in the response file.
Following table gives an overview of all batch versions that are possible for a specific action and their specialities:
Action | Version | Description |
---|---|---|
Capture | 1.0 / 2.0 | Standard version without return of parameter Code |
| 1.x / 2.x | with RefNr (valid for all versions other than 1.0) |
Credit | 1.0 / 2.0 | Standard version without return of parameter Code |
| 1.x / 2.x | with RefNr (valid for all versions other than 1.0) |
Reverse | 1.0 / 2.0 | Standard version without return of parameter Code |
| 1.x / 2x. | with RefNr (valid for all versions other than 1.0) |
Description of the possible batch versions
The structure for a payment with Klarna Payments within a Batch file to be submitted is the following:
HEAD,<MerchantID>,<Date>,<Version> KLARNAPM,CAPTURE,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<InvNo> KLARNAPM,CAPTURE,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<ArticleList> KLARNAPM,CREDIT,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID> KLARNAPM,CREDIT,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<ArticleList> KLARNAPM,REVERSE,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID> FOOT,<CountRecords>,<SumAmount> |
Example for Master MID Funktion:
HEAD,[Master]MerchantID,Date,2.x Type,Action,[Slave]MID,Amount,Currency,TransID,Data (depends on Action) FOOT,CountRecords,SumAmount |
The following table describes the individual fields and values used within the data set (record) in the batch file:
Parameter | Format | CND | Description |
---|---|---|---|
Type | a..11 | M | HEAD for Header, FOOT for Footer, KLARNAPM for Klarna Payments |
Action | a..20 | M | The parameter Action defines the type of transaction: Capture Credit Reverse (cancellation) |
Amount | n..10 | M | Amount in the smallest currency unit (e.g. EUR Cent) Please contact the helpdesk, if you want to capture amounts < 100 (smallest currency unit). |
Currency | a3 | M | Currency, three characters DIN / ISO 4217, permitted are: AUD, CHF, DKK, EUR, GBP, NOK, SEK, USD. |
TransID | ans..64 | M | TransactionID which should be unique for each payment |
RefNr | ns..30 | O | Unique reference number |
PayID | an32 | M | ID for this transaction given by Paygate |
InvNo | ans..30 | O | Invoice number for a part activation or part credit. Longest InvNo so far had 17 digits. |
Description of fields within the record for Batch files
The record area within the response file for Batch transactions looks as follows:
HEAD,<MerchantID>,<Date>,<Version> KLARNAPM,CAPTURE,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<InvNo>,<Status>,<Code> KLARNAPM,CAPTURE,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<ArticleList>,<InvNo>,<Status>,<Code> KLARNAPM,CREDIT,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<Status>,<Code> KLARNAPM,CREDIT,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<ArticleList>,<InvNo>,<Status>,<Code> KLARNAPM,REVERSE,<Amount>,<Currency>,<TransID>,(<RefNr>,)<PayID>,<Status>,<Code> FOOT,<CountRecords>,<SumAmount> |
The following table describes the response parameters which the Batch Manager saves in the Record area for each transaction (standard parameters not explained here, such as <TransID> or <RefNR> and request parameters are returned unchanged and correspond to the call as specified before):
Parameter | Format | CND | Description |
---|---|---|---|
Action | a..20 | M | The parameter Action defines the type of transaction: Capture Credit Reverse (cancellation) |
PayID | an32 | M | ID for this transaction given by Paygate |
Status | a..50 | M | OK or FAILED |
Code | n8 | M | Error code according to Paygate Response Codes (A4 Error codes) |
Description of result parameters within the record for Batch files