General
Introduction
Important: Klarna is Collecting. If you are looking for our processing solution, please look at KlarnaKP.
Klarna provides the option for customers to pay after delivery in one time. The concept includes a customer risk check before the financial risk is transferred to Klarna. By transferring the financial risk to Klarna the merchant is eliminating the order related financial risk. To start the collection process Klarna needs to be informed on dispatch.
Klarna supports both a PayLater flow and a Slice-It flow. Both requests have the same parameters, only the action is different.
For PayLater, use the action "Pay"
For Slice-It, use the action "PayInInstallments"
The Pay Later flow is available in the following country-currency combinations:
- NL - EUR
- DE - EUR
- AT - EUR
- GB - GBP
- DK - DKK
- SE - SEK
- NO - NOK
- FI - EUR
The Slice-It flow is available in the following country-currency combinations:
- DE - EUR
- AT - EUR
- GB - GBP
- DK - DKK
- SE - SEK
- NO - NOK
- FI - EUR
Slice-It is not available in the Netherlands.
Servicecodes and actions
The Klarna service uses the servicecode: klarna
The Klarna service supports the following actions and can be used with Channel "Web":
Transaction requests: Pay, PayInStallments Refund. These requests are to be sent to https://testcheckout.buckaroo.nl/json/Transaction (for tests) or https://checkout.buckaroo.nl/json/Transaction (for live)
Pay
Start by creating Pay request. This will automatically capture the reservation on Klarna's side. Discount should be provided as a separate article with a negative UnitPrice
Request
JSON gateway request
FirstName
string
|
Required
GroupType: BillingCustomer First name of billing customer |
LastName
string
|
Required
GroupType: BillingCustomer Last name of billing customer |
BirthDate
datetime
|
GroupType: BillingCustomer Birthdate of billing customer |
Gender
string
|
Required
GroupType: BillingCustomer Gender of billing customer. Possible values: "male", "female", "unknown" |
Category
string
|
Required
GroupType: BillingCustomer Billing type. Possible values: "B2C", "B2B" |
Email
string
|
Required
GroupType: BillingCustomer Email address of billing customer |
Phone
string
|
Required
GroupType: BillingCustomer Phone number of billing customer |
Street
string
|
Required
GroupType: BillingCustomer Street of billing customer |
StreetNumber
decimal
|
Required
GroupType: BillingCustomer House number of billing customer |
StreetNumberAdditional
string
|
GroupType: BillingCustomer House number suffix of billing customer |
PostalCode
|
Required
GroupType: BillingCustomer Postal code of billing customer |
City
string
|
Required
GroupType: BillingCustomer City of billing customer |
Country
string
|
Required
GroupType: BillingCustomer Country of billing customer. Possible values: NL, DE, AT, FI, DK, NO, SE, GB |
FirstName
string
|
Required
GroupType: ShippingCustomer First name of shipping customer |
LastName
string
|
Required
GroupType: ShippingCustomer Last name of shipping customer |
BirthDate
datetime
|
GroupType: ShippingCustomer Birthdate of shipping customer |
Gender
string
|
GroupType: ShippingCustomer Gender of shipping customer. Possible values: "male", "female", "unknown" |
Category
string
|
Required
GroupType: ShippingCustomer Billing type. Possible values: "B2C", "B2B" |
Email
string
|
Required
GroupType: ShippingCustomer Email of shipping customer |
Phone
string
|
GroupType: ShippingCustomer Phone number of shipping customer |
Street
string
|
Required
GroupType: ShippingCustomer Street of shipping customer |
StreetNumber
decimal
|
Required
GroupType: ShippingCustomer House number of shipping customer |
StreetNumberAdditional
string
|
GroupType: ShippingCustomer House number suffix of shipping customer |
PostalCode
string
|
Required
GroupType: ShippingCustomer Postal code of shipping customer |
City
string
|
Required
GroupType: ShippingCustomer City of shipping customer |
Country
string
|
Required
GroupType: ShippingCustomer Country of shipping customer. Possible values: NL, DE, AT, FI, DK, NO, SE, GB |
Description
string
|
GroupType: Article Article description |
Identifier
string
|
Required
GroupType: Article Article identifier |
URL
string
|
GroupType: Article Article URL |
ImageUrl
string
|
GroupType: Article Article image URL |
Quantity
decimal
|
Required
GroupType: Article Article quantity |
GrossUnitPrice
decimal
|
Required
GroupType: Article Article unit price |
VatPercentage
decimal
|
Required
GroupType: Article Article VAT percentage |
JSON
{
"Currency": "EUR",
"AmountDebit": 10.0,
"AmountCredit": null,
"Invoice": "Test Invoice 123",
"Order": null,
"Description": "Klarna Order Test Invoice 123",
"ClientIP": {
"Type": 0,
"Address": "0.0.0.0"
},
"ReturnURL": "https://www.buckaroo.nl",
"ReturnURLCancel": "https://www.buckaroo.nl/annuleren",
"ReturnURLError": "https://www.buckaroo.nl/mislukt",
"ReturnURLReject": "https://www.buckaroo.nl/geweigerd",
"OriginalTransactionKey": null,
"ServicesSelectableByClient": null,
"ServicesExcludedForClient": null,
"PushURL": null,
"PushURLFailure": null,
"ClientUserAgent": null,
"OriginalTransactionReference": null,
"Services": {
"ServiceList": [
{
"Name": "klarna",
"Action": "pay",
"Version": 0,
"Parameters": [
{
"Name": "FirstName",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "John"
},
{
"Name": "Lastname",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "Doe"
},
{
"Name": "BirthDate",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "01/01/1990"
},
{
"Name": "Gender",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "male"
},
{
"Name": "Category",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "B2C"
},
{
"Name": "Email",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "support@buckaroo.nl"
},
{
"Name": "Phone",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "0307150000"
},
{
"Name": "Street",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "Diemerkade"
},
{
"Name": "StreetNumber",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "1"
},
{
"Name": "StreetNumberAdditional",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": ""
},
{
"Name": "PostalCode",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "1111AA"
},
{
"Name": "City",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "Diemen"
},
{
"Name": "Country",
"GroupType": "BillingCustomer",
"GroupID": "",
"Value": "NL"
},
{
"Name": "FirstName",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "John"
},
{
"Name": "LastName",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "Doe"
},
{
"Name": "BirthDate",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "01/01/1990"
},
{
"Name": "Gender",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "female"
},
{
"Name": "Category",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "B2C"
},
{
"Name": "Email",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "support@buckaroo.nl"
},
{
"Name": "Phone",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "0307105000"
},
{
"Name": "Street",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "Diemerkade"
},
{
"Name": "StreetNumber",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "1"
},
{
"Name": "StreetNumberAdditional",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": ""
},
{
"Name": "PostalCode",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "1111AA"
},
{
"Name": "City",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "Diemen"
},
{
"Name": "Country",
"GroupType": "ShippingCustomer",
"GroupID": "",
"Value": "NL"
},
{
"Name": "Description",
"GroupType": "Article",
"GroupID": "1",
"Value": "Blue Toy Car"
},
{
"Name": "Identifier",
"GroupType": "Article",
"GroupID": "1",
"Value": "111111"
},
{
"Name": "URL",
"GroupType": "Article",
"GroupID": "1",
"Value": ""
},
{
"Name": "ImageUrl",
"GroupType": "Article",
"GroupID": "1",
"Value": ""
},
{
"Name": "Quantity",
"GroupType": "Article",
"GroupID": "1",
"Value": "1"
},
{
"Name": "GrossUnitPrice",
"GroupType": "Article",
"GroupID": "1",
"Value": "10"
},
{
"Name": "VatPercentage",
"GroupType": "Article",
"GroupID": "1",
"Value": "10"
}
]
}
]
},
"CustomParameters": null,
"AdditionalParameters": null
}
Response 200 Status: Ok 400 Status: Access denied 500 Status: Bad request
JSON gateway response
JSON
{
"Key": "72635FC6D48847D4B12EB4AFXXXXXXXX",
"Status": {
"Code": {
"Code": 791,
"Description": "Pending processing"
},
"SubCode": {
"Code": "S002",
"Description": "An additional action is required: Redirect to Klarna."
},
"DateTime": "2021-02-11T08:37:43"
},
"RequiredAction": {
"RedirectURL": "https://checkout.buckaroo.nl/html/redirect.ashx?r=9634CC95B2DB45458AC47FD6XXXXXXXX",
"RequestedInformation": null,
"PayRemainderDetails": null,
"Name": "Redirect",
"TypeDeprecated": 0
},
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "Test Invoice 123",
"ServiceCode": "klarna",
"IsTest": true,
"Currency": "EUR",
"AmountDebit": 10.0,
"TransactionType": "C700",
"MutationType": 1,
"RelatedTransactions": null,
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": "John Doe",
"PayerHash": null,
"PaymentKey": "AFEE970355454E638A11934EXXXXXXXX"
}
Push
JSON push response
JSON
{
"Transaction":{
"Key":"72635FC6D48847D4B12EB4AFXXXXXXXX",
"Invoice":"Test Invoice 123",
"ServiceCode":"klarna",
"Status":{
"Code":{
"Code":190,
"Description":"Success"
},
"SubCode":{
"Code":"S990",
"Description":"The request was successful."
},
"DateTime":"2021-02-11T08:38:19"
},
"IsTest":true,
"Order":null,
"Currency":"EUR",
"AmountDebit":10.0,
"TransactionType":"C700",
"Services":null,
"CustomParameters":null,
"AdditionalParameters":null,
"MutationType":1,
"RelatedTransactions":null,
"IsCancelable":false,
"IssuingCountry":null,
"StartRecurrent":false,
"Recurring":false,
"CustomerName":"John Doe",
"PayerHash":null,
"PaymentKey":"AFEE970355454E638A11934EXXXXXXXX"
}
}
Refund
After a successful payment, a refund action can be performed. Please keep in mind to use the parameter Amount_Credit to specify the refund amount and Originaltransaction to refer to the payment transaction.
Request
JSON gateway request
JSON
{
"Currency": "EUR",
"AmountCredit": 1.45,
"Invoice": "Test Invoice 123_R",
"OriginalTransactionKey": "72635FC6D48847D4B12EB4AFXXXXXXXX",
"Services": {
"ServiceList": [
{
"Name": "klarna",
"Action": "Refund"
}
]
}
}
Response 200 Status: Ok 400 Status: Access denied 500 Status: Bad request
JSON gateway response
JSON
{
"Key": "10C63E926E724A4E8FF53246XXXXXXXX",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": {
"Code": "S001",
"Description": "Transaction successfully processed"
},
"DateTime": "2017-08-14T17:15:33"
},
"RequiredAction": null,
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "Test Invoice 123_R",
"ServiceCode": "klarna",
"IsTest": true,
"Currency": "EUR",
"AmountCredit": 1.45,
"TransactionType": "C701",
"MutationType": 1,
"RelatedTransactions": [
{
"RelationType": "refund",
"RelatedTransactionKey": "72635FC6D48847D4B12EB4AFXXXXXXXX"
}
],
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "608987C866A3462FA5AB550CXXXXXXXX"
}
Push
JSON push
JSON
{
"Transaction":{
"Key":"10C63E926E724A4E8FF53246XXXXXXXX",
"Invoice":"Test Invoice_R",
"ServiceCode":"klarna",
"Status":{
"Code":{
"Code":190,
"Description":"Success"
},
"SubCode":null,
"DateTime":"2021-02-15T09:22:49"
},
"IsTest":true,
"Order":null,
"Currency":"EUR",
"AmountCredit":1.45,
"TransactionType":"C701",
"Services":null,
"CustomParameters":null,
"AdditionalParameters":null,
"MutationType":1,
"RelatedTransactions":[
{
"RelationType":"refund",
"RelatedTransactionKey":"72635FC6D48847D4B12EB4AFXXXXXXXX"
}
],
"IsCancelable":false,
"IssuingCountry":null,
"StartRecurrent":false,
"Recurring":false,
"CustomerName":"John Doe",
"PayerHash":null,
"PaymentKey":null
}
}