Payment Type | Countries | Currency |
---|
Invoice | - Austria
- Danmark
- Finland
- Germany
- The Netherlands
- Norway
- Sweden
| - Euro
- Danish crowns
Norwegian crowns Swedish crowns
|
Installment | - Austria
- Danmark
- Finland
- Germany
- The Netherlands
- Norway
- Sweden
| - Euro
- Danish crowns
Norwegian crowns Swedish crowns
|
UI Text Box |
---|
|
B2B transactions are not supported. |
UI Text Box |
---|
|
- Klarna requires more specific customer data - depending on country of customer
- Status "PENDING" has to be processed
- for API-response "PENDING"
- for TransactionStatus "pending"
- Request "capture" has to use parameter "capturemode"
- Request "debit" has to use parameter "settleaccount"
- add_paydata and workorderid have to be used for update of shopping cart
|
clearingtype | financingtype |
|
---|
fnc | KIS | Klarna "Slice It" (Installment, former KLS) |
fnc
| KIV | Klarna "Pay Later" (Invoice, former KLV) |
Klarna Checkout is a 3 step process.
UI Steps |
---|
UI Step |
---|
The first step is to setup a new checkout session by sending a genericpaynent-request to our server API as listed below. Please make sure to send the customer data within this request as they're needed to initiate a new session.
If the customer leaves the checkout page and comes back later, you can update the created session and change for example the address data. |
UI Step |
---|
Handle tokenPart of the response is a client token. This token needs to be passed to the Klarna Widget. This Widget sends the client token together with the selected payment method (e.g. "Klarna Pay Later") to Klarna to get a authorization token. |
UI Step |
---|
In the last step, you need to send the authorization token received by Klarna widget as part of the (pre-)authorization request to our server api.
UI Text Box |
---|
| The response contains a redirect-URL. You need to redirect the customer to this url, so that Klarna is able to securely handle data and optimize purchase flow. Klarna will automatically redirect the customer back again. The customer doens't need to take any action and will not notice this step in the background. |
|
|
draw.io Diagram |
---|
border | true |
---|
viewerToolbar | true |
---|
| |
---|
fitWindow | false |
---|
diagramName | klarna_checkout |
---|
simpleViewer | false |
---|
width | |
---|
diagramWidth | 1401 |
---|
revision | 3 |
---|
|
In the first step you need to setup a new checkout session. You can do so by sending a genericpamynet-request to our server api as listed below.
Please make sure to send the customer data within this request as they're needed to initiate a new session.
→ Genericpayment start_session
If the customer leaves the checkout page and comes back later, you can update the created session and change for example the address data.
→ Genericpayment update_session
Part of the response is a client token. This token needs to be passed to the Klarna Widget. This Widget sends the client token together with the selected payment method (e.g. "Klarna Pay Later") to Klarna to get a authorization token.
→ Widget
In the last step, you need to send the authorization token received by Klarna widget as part of the (pre-)authorization request to our server api.
→ Preauthorization/Authorization
There are a few things you need to take care of, when integrating Klarna checkout in your shop.
- You need to make sure, that the customer didn't accidently clicked on a Klarna payment method, because you will want to start the checkout process and directly send customer data to Klarna via "start_session" call. So please implement another step where the customer needs to confirm his payment method choice (for example: "By selecting this payment method we will send personal data to Klarna. Please confirm".
- After confirmation of the payment method, you want to start with the first calls to server api as described above and then display the Klarna Widget. This Klarna Widget needs defined parameters to only display the chosen payment method, even if the widget is capable of displaying more than one Klarna payment method. For example after selecting "Klarna Pay Later", the widget should look something like this:

Anchor |
---|
| start_session |
---|
| start_session |
---|
|
Genericpayment start_session
|
API parameter | Required | Comments |
---|
add_paydata[action] | + | identifies the request as one to start a new session Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Fixed Value |
Layout box |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
| start_session |
|
|
add_paydata[merchant_data] | - | "EMD" - Extra Merchant Data - means that integration with any such package depends on (i) merchant’s offering and (ii) merchant’s technical possibilities. It is not to be interpreted in such a way that EMD is not required at all. Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Format |
Layout box |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
| BASE 64 String |
|
|
firstname | + | Excerpt Include |
---|
| firstname - definition |
---|
| firstname - definition |
---|
nopanel | true |
---|
|
|
lastname | + | Excerpt Include |
---|
| lastname - definition |
---|
| lastname - definition |
---|
nopanel | true |
---|
|
|
street | + | Excerpt Include |
---|
| street - definition |
---|
| street - definition |
---|
nopanel | true |
---|
|
|
zip | + | Excerpt Include |
---|
| zip - definition |
---|
| zip - definition |
---|
nopanel | true |
---|
|
|
city | + | Excerpt Include |
---|
| city - definition |
---|
| city - definition |
---|
nopanel | true |
---|
|
|
country | + | Excerpt Include |
---|
| country - definition |
---|
| country - definition |
---|
nopanel | true |
---|
|
|
addressaddition | + | Excerpt Include |
---|
| addressaddition - definition |
---|
| addressaddition - definition |
---|
nopanel | true |
---|
|
|
gender | o | Excerpt Include |
---|
| gender - definition |
---|
| gender - definition |
---|
nopanel | true |
---|
|
|
ip | + | Excerpt Include |
---|
| ip - definition |
---|
| ip - definition |
---|
nopanel | true |
---|
|
|
email | + | Excerpt Include |
---|
| email - definition |
---|
| email - definition |
---|
nopanel | true |
---|
|
|
telephonenumber | + | Excerpt Include |
---|
| telephonenumber - definition |
---|
| telephonenumber - definition |
---|
nopanel | true |
---|
|
|
birthday | o | Mandatory for _____ Excerpt Include |
---|
| birthday - definition |
---|
| birthday - definition |
---|
nopanel | true |
---|
|
|
shipping_firstname | - | Excerpt Include |
---|
| shipping_firstname - definition |
---|
| shipping_firstname - definition |
---|
nopanel | true |
---|
|
|
shipping_lastname | - | Excerpt Include |
---|
| shipping_lastname - definition |
---|
| shipping_lastname - definition |
---|
nopanel | true |
---|
|
|
shipping_company | - | Excerpt Include |
---|
| shipping_company - definition |
---|
| shipping_company - definition |
---|
nopanel | true |
---|
|
|
shipping_street | - ? | required: at least one character Excerpt Include |
---|
| shipping_street - definition |
---|
| shipping_street - definition |
---|
nopanel | true |
---|
|
|
shipping_zip | - | Excerpt Include |
---|
| shipping_zip - definition |
---|
| shipping_zip - definition |
---|
nopanel | true |
---|
|
|
shipping_city | - | Excerpt Include |
---|
| shipping_city - definition |
---|
| shipping_city - definition |
---|
nopanel | true |
---|
|
|
shipping_country | - | Excerpt Include |
---|
| shipping_country - definition |
---|
| shipping_country - definition |
---|
nopanel | true |
---|
|
|
add_paydata[last_four_ssn] | - | Last four digits for customer social security number. Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Format |
Layout box |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
| NUMERIC(4) |
|
|
add_paydata[organization_entity_type] | - | Only relevant for B2B transactions. |
personalid | o | Excerpt Include |
---|
| personalid - definition |
---|
| personalid - definition |
---|
nopanel | true |
---|
|
|
AN..32 |
it[n] | + | For KLV / KLS: Item type
goods | Goods | shipment | Shipping charges | handling | Handling fee | voucher | Voucher / discount |
|
id[n] | + | Excerpt Include |
---|
| id[n] - definition |
---|
| id[n] - definition |
---|
nopanel | true |
---|
|
AN..32 |
Product number, order number, etc.
Permitted symbols:
0-9 a-z A-Z ()[]{} +-_#/:
[n] starting with [1]; serially numbered; max [400]
pr[n] | + | Excerpt Include |
---|
| pr[n] - definition |
---|
| pr[n] - definition |
---|
nopanel | true |
---|
|
|
no[n] | + | Excerpt Include |
---|
| no[n] - definition |
---|
| no[n] - definition |
---|
nopanel | true |
---|
|
|
de |
prprprno[n] | | de[n] - definition |
---|
nopanel | true |
---|
|
|
Unit gross price in cent, max. 19 999 999 99
[n] starting with [1]; serially numbered; max [400]
N..10
nono | va[n] - definition |
---|
nopanel | true |
---|
|
|
add_paydata[klsid] | + | Mandatory for Klarna Installment (KLS): Campaign code |
|
API parameter | Required | Comments |
---|
add_paydata[session_id] | + | Identifier for the started session at Klarna |
add_paydata[client_token] | + | Client token to authorize the session for payment via Klarna Widget |
add_paydata[authorized_payment_method] | + | Name of payment that got authorized for customer payment. (You will only receive the parameters according to the payment method you selected via clearingtype and financingtype) |
add_paydata[payment_method_category_name] | + | Name of Klarna payment category
|
add_paydata[payment_method_category_identifier] | + | Identifier for Klarna payment category |
add_paydata[payment_method_category_asset_url_descriptive] | + | URL of Klarna payment category assets for descriptive design (payment method identified by small icon and test on badge |
Quantity
[n] starting with [1]; serially numbered; max [400]
N..6
de[n] | + | Excerpt Include |
---|
de[n] - definition | de[n] - definition | nopanel | true |
---|
Description
[n] starting with [1]; serially numbered; max [400]
va[n] | + | Excerpt Include |
---|
va[n] - definition | va[n] - definition | nopanel | true |
---|
N..4
VAT rate (% or bp) of gross price
Mandatory for payment type KLV, KLS
[n] starting with [1]; serially numbered; max [400]
add_paydata[klsid] | + | Mandatory for Klarna Installment (KLS): Campaign code |
|
API parameter | Required | Comments | add_paydata[session_id] | + | Identifier for the started session at Klarna | add_paydata[client_token] | + | Client token to authorize the session for payment via Klarna Widget | add_paydata[authorized_payment_method] | + | Name of payment that got authorized for customer payment. (You will only receive the parameters according to the payment method you selected via clearingtype and financingtype)
|
---|
add_paydata[payment_method_category_asset_url_namestandard] | + | Name URL of Klarna payment category
| add_paydata[payment_method_category_identifier] | + | Identifier for Klarna payment category | add_paydata[payment_method_category_asset_url_descriptive] | + | URL of Klarna payment category assets for descriptive design (payment method identified by small icon and test on badge)
| add_paydata[payment_method_category_asset_url_standard] | + | URL of Klarna payment category assets for standard design (payment method only identified by small icon on badge)
| assets for standard design (payment method only identified by small icon on badge)
|
status | + |
Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Permitted Values |
|
| status | + | Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Permitted Values |
linchpin-layout-box-macro |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
| APPROVED ERROR |
|
|
APPROVED |
|
|
---|
workorderid | + | Excerpt Include |
---|
| workorderid - definition |
---|
| workorderid - definition |
---|
nopanel | true |
---|
|
|
ERROR |
|
|
---|
errorcode | + | Excerpt Include |
---|
| errorcode - definition |
---|
| errorcode - definition |
---|
nopanel | true |
---|
|
|
errormessage | + | Excerpt Include |
---|
| errormessage - definition |
---|
| errormessage - definition |
---|
nopanel | true |
---|
|
|
customermessage | + | Excerpt Include |
---|
| customermessage - definition |
---|
| customermessage - definition |
---|
nopanel | true |
---|
|
|
Code Block |
---|
add_paydata[action]=start_session
aid=111111
amount=2222
api_version=1.00
birthday=1958101
city=Neuss
clearingtype=fnc
country=DE
currency=EUR
de[1]=for
ocean use only
email=klarna@approved.de
encoding=UTF-8
financingtype=KLS
firstname=Testperson-de
gender=m
id[1]=boat66
it[1]=goods
key=abcd12345698fffkfk
language=de
lastname=Approved
mid=11111
mode=test
no[1]=1
portalid=2011111
pr[1]=8540
request=genericpayment
salutation=Herr
street=Hellersbergstraße 14
telephonenumber=01522113356
va[1]=1900
zip=41460 |
Code Block |
---|
status=OK
add_paydata[payment_method_category_name_3]=Slice it.
add_paydata[payment_method_category_name_2]=Pay later.
add_paydata[payment_method_category_name_1]=Direct debit
add_paydata[session_id]=123-2227-456-avc11-fefe456
add_paydata[payment_method_category_identifier_3]=pay_over_time
add_paydata[client_token]=W9uX2lkIiA6ICI3MGFjNGI3Ny0yMjI3LTdkNDEtY
add_paydata[payment_method_category_identifier_2]=pay_later add_paydata[payment_method_category_asset_url_standard_2]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_later/standard/pink.svg add_paydata[payment_method_category_asset_url_standard_1]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_now/standard/pink.svg add_paydata[payment_method_category_asset_url_standard_3]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/slice_it/standard/pink.svg add_paydata[payment_method_category_asset_url_descriptive_3]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/slice_it/descriptive/pink.svg add_paydata[payment_method_category_asset_url_descriptive_2]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_later/descriptive/pink.svg
add_paydata[payment_method_category_asset_url_descriptive_1]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_now/descriptive/pink.svg
add_paydata[payment_method_category_identifier_1]=direct_debit
workorderid=WX123456799 |
Anchor |
---|
update_session | update_session | Genericpayment update_session
add_paydata[payment_method_category_asset_url_descriptive_1]=https://cdn.klarna.com/1.0/shared/image/generic/badge/en_us/pay_now/descriptive/pink.svg
add_paydata[payment_method_category_identifier_1]=direct_debit
workorderid=WX123456799 |
Anchor |
---|
| update_session |
---|
| update_session |
---|
|
Genericpayment update_sessionTo update an order, you need to send a genericpayment-request with action=update. The call needs to provide the new list of items representing the complete shopping cart.
UI Text Box |
---|
|
- An update is only possible as long as the preauthorization is not captured completly.
- Don’t send the difference/changes, instead you need to send the complete new item list
- The amount can’t be higher as the amount of the preauthorization. A lower amount is allowed.
|
|
API parameter | Required | Comments |
---|
add_paydata[action] | + | Fixed value "update" |
add_paydata[reservation_txid] | + | Referencing the reservation (received from authorization.response -> add_paydata[reservation_txid]) |
workorderid | + | Referencing the reservation (received from authorization.response -> add_paydata[workorderid]) Excerpt Include |
---|
| workorderid - definition |
---|
| workorderid - definition |
---|
nopanel | true |
---|
|
|
country | + | Excerpt Include |
---|
| country - definition |
---|
| country - definition |
---|
nopanel | true |
---|
|
|
amount | + | Excerpt Include |
---|
| amount - definition |
---|
| amount - definition |
---|
nopanel | true |
---|
|
|
currency | + | Excerpt Include |
---|
| currency - definition |
---|
| currency - definition |
---|
nopanel | true |
---|
|
|
financingtype | + |
Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Permitted Values |
Layout box |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
| KIS (former KLV ) KIV (former KLS ) |
|
|
it[n] | + | For KLV / KLS: Item type Format Default goods | Goods | shipment | Shipping charges | handling | Handling fee | voucher | Voucher / discount |
|
id |
To update an order, you need to send a genericpayment-request with action=update. The call needs to provide the new list of items representing the complete shopping cart.
UI Text Box |
---|
|
- An update is only possible as long as the preauthorization is not captured completly.
- Don’t send the difference/changes, instead you need to send the complete new item list
- The amount can’t be higher as the amount of the preauthorization. A lower amount is allowed.
|
|
API parameter | Required | Comments |
---|
add_paydata[action] | + | Fixed value "update" |
add_paydata[reservation_txid] | + | Referencing the reservation (received from authorization.response -> add_paydata[reservation_txid]) |
workorderid | + | Referencing the reservation (received from authorization.response -> add_paydata[workorderid])
Excerpt Include |
---|
workorderid - definition | workorderid - definition | nopanel | true |
---|
country | + | Excerpt Include |
---|
country - definition | country - definition | nopanel | true |
---|
amount | + | Excerpt Include |
---|
amount - definition | amount - definition | nopanel | true |
---|
Total gross amount (in smallest currency unit! e.g.
cent, max. 19 999 999 99)
N..10
currency | + | Excerpt Include |
---|
currency - definition | currency - definition | nopanel | true |
---|
Currency (ISO 4217)
financingtype | + | Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
|
Permitted Values |
Layout box |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
|
KIS (former KLV ) KIV (former KLS ) |
it[n] | + | For KLV / KLS: Item type
Format Default
goods | Goods |
shipment | Shipping charges |
handling | Handling fee |
voucher | Voucher / discount |
id[n] | + | Excerpt Include |
---|
id[n] - definition | id[n] - definition | nopanel | true |
---|
Product number, order number, etc.
Permitted symbols:
0-9 a-z A-Z ()[]{} +-_#/:
[n] starting with [1]; serially numbered; max [400]
AN..32
prprpr | id[n] - definition |
---|
nopanel | true |
---|
|
|
Unit gross price in cent, max. 19 999 999 99
[n] starting with [1]; serially numbered; max [400]
|
pr[n] | + | Excerpt Include |
---|
| pr[n] - definition |
---|
| pr[n] - definition |
---|
nopanel | true |
---|
|
|
N..10 |
no[n] | + | Quantity [n] starting with [1]; serially numbered; max [400] N..6
|
de[n] | + | Excerpt Include |
---|
| de[n] - definition |
---|
| de[n] - definition |
---|
nopanel | true |
---|
|
|
Description[n] starting with [1]; serially numbered; max [400]va[n] - definition[n] - definitionnopanel | true |
VAT rate (% or bp) of gross priceMandatory for payment type KLV, KLS starting with [1]; serially numbered; max [400]N..4- definition | | va[n] - definition |
---|
nopanel | true |
---|
|
|
|
API parameter | Required | Comments |
---|
status | + |
Section |
---|
Layout box |
---|
cssClass | payonePermittedSymbols |
---|
floating | left |
---|
| Permitted Values |
Layout box |
---|
cssClass | payonePermittedSymbolsValue |
---|
floating | left |
---|
| APPROVED ERROR |
|
|
APPROVED |
|
|
---|
workorderid | + | Excerpt Include |
---|
| workorderid - definition |
---|
| workorderid - definition |
---|
nopanel | true |
---|
|
|
ERROR |
|
|
---|
errorcode | + | Excerpt Include |
---|
| errorcode - definition |
---|
| errorcode - definition |
---|
nopanel | true |
---|
|
|
errormessage | + | Excerpt Include |
---|
| errormessage - definition |
---|
| errormessage - definition |
---|
nopanel | true |
---|
|
|
customermessage | + | Excerpt Include |
---|
| customermessage - definition |
---|
| customermessage - definition |
---|
nopanel | true |
---|
|
|
Klarna Widget
the follwing integration steps are taken from Klarna documentation ( https://developers.klarna.com/documentation/klarna-payments/integration-guide/present-klarna-widget )
After creating a new session, you want to present the klarna widget to your customer. This widget allows you to present all 3 payment methods offered by Klarna to the customer or define what payment method should be presented to the customer. This is
UI Steps |
---|
UI Step |
---|
Add SDK to your page (insert in body)
Code Block |
---|
<script>
window.klarnaAsyncCallback = function () {
// This is where you start calling Klarna's JS SDK functions
//
// Klarna.Payments.init({....})
};
</script>
<script src="https://x.klarnacdn.net/kp/lib/v1/api.js" async></script> |
|
UI Step |
---|
Initialize SDK and place a container on your page
Code Block |
---|
Klarna.Payments.init({
client_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.dtxWM6MIcgoeMgH87tGvsNDY6cH'
}) |
Code Block |
---|
<div id="klarna_container"></div> |
|
UI Step |
---|
Load Klarna Widget Code Block |
---|
Klarna.Payments.load({
container: '#klarna-payments-container',
payment_method_category: 'pay_later'
}, function (res) {
console.debug(res);
}) |
|
UI Step |
---|
Receive Response from load call Klarna’s widget uses the show_form:true/false field as a response flag to load and to authorize calls in the Javascript SDK.
If show_form: true , and there are no errors in the object returned, Klarna renders the payment options available to the customer in the widget.
Adjust and try againIf show_form: true , but an error is returned as well, then something is wrong and the consumer needs to take action before moving forward. Klarna will inform the consumer about the details of the error in the widget. Optionally, you can interpret the invalid fields in the error message and take appropriate actions on your checkout page. See the JavaScript SDK reference page for further information.
If show_form: false , the payment method chosen by the customer will not be offered for this order based on Klarna’s evaluation. A message is displayed to the consumer in the Widget. When Klarna returns a show_form: false , your store cannot offer the selected payment method to this customer. You need to present other payment methods to the customer. |
|
Anchor |
---|
| authorization |
---|
| authorization |
---|
|
Preauthorization/Authorization
First name
AN1..50
Excerpt Include |
---|
| firstname - definition |
---|
| firstname - definition |
---|
nopanel | true |
---|
|
|
lastname | + |
Surname
AN2..50 | Excerpt Include |
---|
| lastname - definition |
---|
| lastname - definition |
---|
nopanel | true |
---|
|
|
company | - | If filled, the transaction is marked as B2B |
.AN.50 Excerpt Include |
---|
| company - definition |
---|
| company - definition |
---|
nopanel | true |
---|
|
|
street | + |
Street number and name
AN1..50 - definitionstreet - definition | nopanel | true |
---|
zip | + | Postcode, format [a-zA-Z0-9_.-/]{2,10}
- definition | | street - definition |
---|
nopanel | true |
---|
|
|
zip | + |
AN2..10 | Excerpt Include |
---|
| zip - definition |
---|
| zip - definition |
---|
nopanel | true |
---|
|
|
city | + |
City
AN2..50
Excerpt Include |
---|
| city - definition |
---|
| city - definition |
---|
nopanel | true |
---|
|
|
country | + |
Country (ISO 3166)
Default | Excerpt Include |
---|
| country - definition |
---|
| country - definition |
---|
nopanel | true |
---|
|
|
addressaddition | + |
Address line 2 (e.g. "7th floor", "c/o Maier")
AN1..50
Excerpt Include |
---|
| addressaddition - definition |
---|
| addressaddition - definition |
---|
nopanel | true |
---|
|
|
gender | o | f=female, m=male
Default | Excerpt Include |
---|
| gender - definition |
---|
| gender - definition |
---|
nopanel | true |
---|
|
"d" is currently not supported by Klarna |
ip | + |
Customer's IP-V4-address (123.123.123.123) or IP
V6-address
AN..39 | Excerpt Include |
---|
| ip - definition |
---|
| ip - definition |
---|
nopanel | true |
---|
|
|
email | + |
Email address
AN..254 | Excerpt Include |
---|
| email - definition |
---|
| email - definition |
---|
nopanel | true |
---|
|
|
telephonenumber | + |
Telephone numberAN..30
Excerpt Include |
---|
| telephonenumber - definition |
---|
| telephonenumber - definition |
---|
nopanel | true |
---|
|
|
birthday | o | Date of birth (YYYYMMDD)
Mandatory for Germany, Netherlands and Austria
N8 |
birthday | o | Excerpt Include |
---|
| birthday - definition |
---|
| birthday - definition |
---|
nopanel | true |
---|
|
Mandatory for Germany, Netherlands and Austria |
shipping_firstname | - |
First nameAN..50
Excerpt Include |
---|
| shipping_firstname - definition |
---|
| shipping_firstname - definition |
---|
nopanel | true |
---|
|
|
shipping_lastname | - |
Surname
AN..50 | Excerpt Include |
---|
| shipping_lastname - definition |
---|
| shipping_lastname - definition |
---|
nopanel | true |
---|
|
|
shipping_company | - |
Company
AN2..50
Excerpt Include |
---|
| shipping_company - definition |
---|
| shipping_company - definition |
---|
nopanel | true |
---|
|
|
shipping_street | - |
Street number and name (required: at least one character)
AN1..50 | Excerpt Include |
---|
| shipping_street - definition |
---|
| shipping_street - definition |
---|
nopanel | true |
---|
|
|
shipping |
_zip- | Postcode, format [a-zA-Z0-9_.-/]{2,10}
AN2..10 | Excerpt Include |
---|
| shipping_zip - definition |
---|
| shipping_zip - definition |
---|
nopanel | true |
---|
|
|
shipping_city | - |
City
AN2..50 | Excerpt Include |
---|
| shipping_city - definition |
---|
| shipping_city - definition |
---|
nopanel | true |
---|
|
|
shipping_country | - |
Country (ISO 3166)
Default
Excerpt Include |
---|
| shipping_country - definition |
---|
| shipping_country - definition |
---|
nopanel | true |
---|
|
|
personalid | o |
Mandatory for Sweden, Finland, Denmark and Norway
AN..32 | Excerpt Include |
---|
| personalid - definition |
---|
| personalid - definition |
---|
nopanel | true |
---|
|
Mandatory for Sweden, Finland, Denmark and Norway |
it[n] | + | For KLV / KLS: Item type
goods | Goods | shipment | Shipping charges | handling | Handling fee |
|
voucher | Voucher / discount |
Default Format
| voucher | Voucher / discount |
Default Format |
id[n] | + |
id[n] | + | Product number, order number, etc.
Permitted symbols:
0-9 a-z A-Z ()[]{} +-_#/:
[n] starting with [1]; serially numbered; max [400]
AN..32 | Excerpt Include |
---|
| id[n] - definition |
---|
| id[n] - definition |
---|
nopanel |
---|
|
|
true | pr[n] | + | Unit gross price in cent, max. 19 999 999 99
[n] starting with [1]; serially numbered; max [400]
N..10 | Excerpt Include |
---|
| pr[n] - definition |
---|
| pr[n] - definition |
---|
nopanel | true |
---|
|
|
no[n] | + | Quantity [n] starting with [1]; serially numbered; max [400] N..6
|
de[n] | + |
Description[n] starting with [1]; serially numbered; max [400]AN..255
Excerpt Include |
---|
| de[n] - definition |
---|
| de[n] - definition |
---|
nopanel | true |
---|
|
|
va[n] | + |
VAT rate (% or bp) of gross price
Mandatory for payment type KLV, KLS
[n] starting with [1]; serially numbered; max [400]
N..4 | Excerpt Include |
---|
| va[n] - definition |
---|
| va[n] - definition |
---|
nopanel | true |
---|
|
|
add_paydata[klsid] | o | Mandatory for Klarna Installment (KLS): Campaign code |
Code Block |
---|
add_paydata[authorization_token]=aaa-bbbb-11111-2222-ccc
aid=12346
amount=8540
api_version=3.10
backurl=https://meine.test.url.de/Checkout/back
birthday=19600707
city=Neuss
clearingtype=fnc
country=DE
currency=EUR
de[1]=for ocean use only
email=klarna@approved.de
encoding=UTF-8
errorurl=https://meine.test.url.de/Checkout/error
financingtype=KLS
firstname=Testperson-de
gender=m
id[1]=boat66
it[1]=goods
key=e123dc456a
language=de
lastname=Approved
mid=12345
mode=test
narrative_text=0123456789012345678901234567890123456789
no[1]=1
portalid=2000123
pr[1]=8540
reference=R15595689952007
request=authorization
salutation=Herr
street=Hellersbergstraße 14
successurl=https://meine.test.url.de/Checkout/success
telephonenumber=01522113356
va[1]=1900
zip=41460 |
|
API parameter | Required | Comments |
---|
add_paydata[workorderid] | + | Klarna Invoice: Workorder ID, used for update calls (cart updates) |
add_paydata[reservation_txid] | + | Klarna Invoice: Reservation ID, used for update calls (cart updates) |
Code Block |
---|
redirecturl=https://klarna-payments-eu.playground.klarna.com/v1/sessions/aaa-bbbb-11111-2222-ccc/redirect
status=REDIRECT
txid=30343747
userid=7890123 |
|
API parameter | Required | Comments |
---|
capturemode | + | Parameter capturemode is mandatory to indicate whether this capture will be the last one. (Default: completed) Excerpt Include |
---|
| capturemode - definition |
---|
| capturemode - definition |
---|
nopanel | true |
---|
|
|
settleaccount | + | Parameter settleaccount is mandatory to indicate whether a refund to the customer should be initiated. (Default: yes) Excerpt Include |
---|
| settleaccount - definition |
---|
| settleaccount - definition |
---|
nopanel | true |
---|
|
|
|
API parameter | Required | Comments |
---|
clearing_instructionnote | o | - A URL pointing to a PDF of the invoice. (If invoice by post or by e-mail isn’t activated.)
- The URL is valid for 30 days.
- This feature has to be requested.
|
|
API parameter | Required | Comments |
---|
settleaccount | + | Parameter settleaccount is mandatory to indicate whether a refund to the customer should be initiated. (Default: yes) Excerpt Include |
---|
| settleaccount - definition |
---|
| settleaccount - definition |
---|
nopanel | true |
---|
|
|
If you're using vouchers in your checkout, and want to partial refund items, you do have 2 options to do this:
- send a debit-request with the items using the original amount without any discounts and send a additional item as voucher, with an amount that sums up all discounts
- example cart with auth
- item 1; red car; 20 €
- item 2; green truck; 30 €
- item 3; voucher -10€ (-5€ discount on both items)
- example cart with debit/refund
- item 1; red car; 20 €
- item 2; voucher -5€ (15€ for one item will be returned)
- send a debit-request with the items using an reduced amount, so that the whole discount is broken down on every item.
- example cart with auth
- item 1; red car; 20 €
- item 2; green truck; 30 €
- item 3; voucher -10€ (-5€ discount on both items)
- example cart with debit/refund
- item 1; red car; 15 € (15€ for one item will be returned)