General

Klarna provides the option for customers to pay after delivery in one time or in multiple installments. (This last functionality is only available in Germany). 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.

The general flow of a Klarna payment is asd follows. After the shopping cycle the webshop redirects the consumer to the checkout. In this checkout Klarna can be chosen and the check for using Klarna will be done at confirming the order. After the check comes back with an OK, the order can be shipped, while the payment will be handled with Klarna. This cycle is called the Reserve / Authorize. When the order is ready to be shipped, the invoice will be generated and the announcement of the (partial) shipment can be send to Buckaroo. This cycle is called the Activate / Capture. Multiple captures are possible when the order will be send in multiple shipments. This creates an invoice per shipment. When (part) of the shipment is send back to the merchant, a part of the value of the return can be refunded. The payout of Klarna and the consumer collection will be corrected to meet the total value of the shopped goods.

Klarna payment conditions

Klarna's consumer terms and conditions is a mandatory implementation in the integration. The following links and information need to be displayed when checkout out with Klarna.

Additionally, customers from Germany and Austria need to accept data usage terms.

First, display the following text:

“Mit der Übermittlung der für die Abwicklung der gewählten Klarna Zahlungsmethode und einer Identitäts- und Bonitätsprüfung erforderlichen Daten an Klarna bin ich einverstanden. Meine Einwilligung kann ich jederzeit mit Wirkung für die Zukunft widerrufen. Es gelten die AGB des Händlers”.

Secondly, show a link to the Klarna terms:

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, 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)

Data requests: Reserve, CancelReservation, UpdateReservation, GetPClasses. These requests are to be sent to https://testcheckout.buckaroo.nl/json/DataRequest (for tests) or https://checkout.buckaroo.nl/json/DataRequest (for live).

When performing test transactions, use the test credentials on the following page: https://developers.klarna.com/en/nl/kpm/test-credentials

Autocapture

Buckaroo can automatically perform an immediate full capture on a requested Reservation if the Autocapture is activated in the merchant's account. This can be done by request at Buckaroo Frontoffice and will only be activated if the merchant has an approval for this with Klarna.

Reserve

Start an order by performing a Reserve request. When approved by Klarna, a reservation will be created for the specified products. For this call, the AmounDebit parameter can be left out (but do specify the currency). A discount should be specified as an article, with a negative ArticlePrice. Lastly, Klarna does not support B2B orders.

View in playground

Request


JSON gateway request

ClientIP
Required

IP-address of the customer, in the following format: "ClientIP": { "Type": 0, "Address": "0.0.0.0" }, where type 0 = IPv4 and type 1 = IPv6. Note: this is a basic parameter.

ArticleTitle
Required

Name of article

ArticleNumber
Required

Number by which the article is identified

ArticleType

Whether the article is a product or a discount (value = General), a shipping fee (value = ShipmentFee) or a fee for the chosen payment method (value = HandlingFee). This parameter is not required but can be used to place the products in the right order on the invoice that Klarna sends.

ArticlePrice
Required

Price per article (including VAT)

ArticleQuantity
Required

Number of articles

ArticleVat
Required

VAT percentage of article

BillingCareOf

Person/company receiving the invoice on behalf of billed person

BillingCellPhoneNumber

Billing cell phone number. It is required to sent in at least 1 billing phone number; either BillingCellPhoneNumber or BillingPhoneNumber.

BillingCity
Required

Billing city

BillingCompanyName

Billing company name

BillingCountry
Required

Billing country. Possible values: NL (Netherlands), DE (Germany) or AT (Austria).

BillingEmail
Required

Billing email address

BillingFirstName
Required

Billing first name

BillingLastName

Billing last name

BillingHouseNumber
Required

Billing house number

BillingHouseNumberSuffix

Billing house number suffix (NL)

BillingPhoneNumber

Billing phone number. It is required to sent in at least 1 billing phone number; either BillingCellPhoneNumber or BillingPhoneNumber.

BillingPostalCode

Billing postal code

BillingStreet
Required

Billing street

Encoding
Required

Country name (English) where the consumer is registered. For example: Netherlands, Germany, Austria. Secondly, it must correspond with the BillingCountry.

Gender
Required

The gender of the customer. 1=Male, 2=Female.

OperatingCountry
Required

Country where your sales will be. Possible values: NL (Netherlands), DE (Germany) or AT (Austria). It must be the same as BillingCountry.

PClass

A value that represents a partial payment setting. It can be obtained by performing the GetPClasses function

Pno
Required

Consumer’s birth date. Use the following format: DDMMYYYY

ShippingSameAsBilling
Required

Specifies whether the billing address is the same as the shipping address

ShippingCareOf

Person/company receiving the shipment on behalf of the shipping recipient

ShippingCellPhoneNumber

Shipping cell phone number. If Shipping address is provided, then it is required to sent in at least 1 shipping phone number; either ShippingCellPhoneNumber or ShippingPhoneNumber.

ShippingCity

Shipping city

ShippingCompany

Shipping company name

ShippingCountry

Shipping country code. It should be the same as Billing country.

ShippingEmail

Shipping email address

ShippingFirstName

Shipping first name. It should be the same as Billing first name

ShippingLastName

Shipping last name. It should be the same as Billing last name

ShippingHouseNumber

Shipping house number

ShippingHouseNumberSuffix

Shipping house number suffix

ShippingPhoneNumber

Shipping phone number. If Shipping address is provided, then it is required to sent in at least 1 shipping phone number; either ShippingCellPhoneNumber or ShippingPhoneNumber.

ShippingPostalCode

Shipping postal code

ShippingStreet

Shipping street

JSON

copy
{
   "Currency": "EUR",
   "Invoice": "testinvoice 1234zh",
   "ClientIP": {
      "Type": 0,
      "Address": "0.0.0.0"
   },
   "Services": {
      "ServiceList": [
         {
            "Name": "klarna",
            "Action": "Reserve",
            "Parameters": [
               {
                  "Name": "ArticleTitle",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "Blue Toy Car"
               },
               {
                  "Name": "ArticleNumber",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "12345"
               },
               {
                  "Name": "ArticleType",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "General"
               },
               {
                  "Name": "ArticleQuantity",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "1"
               },
               {
                  "Name": "ArticlePrice",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "10.00"
               },
               {
                  "Name": "ArticleVat",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "19"
               },
               {
                  "Name": "ArticleTitle",
                  "GroupType": "Article",
                  "GroupID": "2",
                  "Value": "Yellow Toy Train"
               },
               {
                  "Name": "ArticleNumber",
                  "GroupType": "Article",
                  "GroupID": "2",
                  "Value": "123456"
               },
               {
                  "Name": "ArticleType",
                  "GroupType": "Article",
                  "GroupID": "2",
                  "Value": "General"
               },
               {
                  "Name": "ArticleQuantity",
                  "GroupType": "Article",
                  "GroupID": "2",
                  "Value": "1"
               },
               {
                  "Name": "ArticlePrice",
                  "GroupType": "Article",
                  "GroupID": "2",
                  "Value": "5.00"
               },
               {
                  "Name": "ArticleVat",
                  "GroupType": "Article",
                  "GroupID": "2",
                  "Value": "19"
               },
               {
                  "Name": "ArticleTitle",
                  "GroupType": "Article",
                  "GroupID": "3",
                  "Value": "Discount"
               },
               {
                  "Name": "ArticleNumber",
                  "GroupType": "Article",
                  "GroupID": "3",
                  "Value": "1234567"
               },
               {
                  "Name": "ArticleQuantity",
                  "GroupType": "Article",
                  "GroupID": "3",
                  "Value": "1"
               },
               {
                  "Name": "ArticlePrice",
                  "GroupType": "Article",
                  "GroupID": "3",
                  "Value": "-1.00"
               },
               {
                  "Name": "ArticleVat",
                  "GroupType": "Article",
                  "GroupID": "3",
                  "Value": "0"
               },
               {
                  "Name": "BillingFirstName",
                  "Value": "Testperson-nl"
               },
               {
                  "Name": "BillingLastName",
                  "Value": "Approved"
               },
               {
                  "Name": "BillingStreet",
                  "Value": "Neherkade"
               },
               {
                  "Name": "BillingHouseNumber",
                  "Value": "1"
               },
               {
                  "Name": "BillingPostalCode",
                  "Value": "2521VA"
               },
               {
                  "Name": "BillingCity",
                  "Value": "Gravenhage"
               },
               {
                  "Name": "BillingCountry",
                  "Value": "NL"
               },
               {
                  "Name": "BillingCellPhoneNumber",
                  "Value": "0612345678"
               },
               {
                  "Name": "BillingEmail",
                  "Value": "youremail@example.nl"
               },
               {
                  "Name": "ShippingFirstName",
                  "Value": "Testperson-nl"
               },
               {
                  "Name": "ShippingLastName",
                  "Value": "Approved"
               },
               {
                  "Name": "ShippingStreet",
                  "Value": "Neherkade"
               },
               {
                  "Name": "ShippingHouseNumber",
                  "Value": "2"
               },
               {
                  "Name": "ShippingPostalCode",
                  "Value": "2521VA"
               },
               {
                  "Name": "ShippingCity",
                  "Value": "Gravenhage"
               },
               {
                  "Name": "ShippingCountry",
                  "Value": "NL"
               },
               {
                  "Name": "ShippingPhoneNumber",
                  "Value": "0698765432"
               },
               {
                  "Name": "ShippingEmail",
                  "Value": "youremail@example.nl"
               },
               {
                  "Name": "Gender",
                  "Value": "1"
               },
               {
                  "Name": "Encoding",
                  "Value": "Netherlands"
               },
               {
                  "Name": "OperatingCountry",
                  "Value": "NL"
               },
               {
                  "Name": "Pno",
                  "Value": "10071970"
               },
               {
                  "Name": "ShippingSameAsBilling",
                  "Value": "false"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

ReservationNumber

Klarna reservation number

JSON

copy
{
   "Key": "49A59CD13A47456BB05638B95E0C5xxx",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-09-22T09:13:49"
   },
   "RequiredAction": null,
   "Services": [
      {
         "Name": "klarna",
         "Action": null,
         "Parameters": [
            {
               "Name": "ReservationNumber",
               "Value": "2379012xxx"
            }
         ]
      }
   ],
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "ServiceCode": "klarna",
   "IsTest": true,
   "ConsumerMessage": null
}

Push


JSON push response

ReservationNumber

Klarna reservation number

ReservationNumber

Klarna reservation number

JSON

copy
{
   "DataRequest": {
      "Key": "49A59CD13A47456BB05638B95E0C5xxx",
      "Invoice": "testinvoice 1234zh",
      "ServiceCode": "klarna",
      "ActionCode": "Reserve",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Transaction successfully processed"
         },
         "SubCode": null,
         "DateTime": "2017-09-22T09:13:49+02:00"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountDebit": 14,
      "Services": [
         {
            "Name": "klarna",
            "Action": null,
            "Parameters": [
               {
                  "Name": "ReservationNumber",
                  "Value": "2379012xxx"
               }
            ],
            "VersionAsProperty": 1
         }
      ],
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 0,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": null,
      "PayerHash": null,
      "PaymentKey": null
   }
}

CancelReservation

In case of a reservation, the requested amount will be reserved from the customer’s account. This reservation will have to be activated (the amount will be captured): the amount will be deducted from the customer’s account or canceled. Both full- and partial activations are possible. When an accepted reservation will not be shipped this should be cancel to clear the reserved amount of the consumer. This can also be used to cancel the remaining part in case of partial shipment that can’t be shipped.

View in playground

Request


JSON gateway request

ReservationNumber
Required

Klarna reservation number

JSON

copy
{
   "Currency": "EUR",
   "Invoice": "testinvoice 123",
   "Services": {
      "ServiceList": [
         {
            "Name": "klarna",
            "Action": "CancelReservation",
            "Parameters": [
               {
                  "Name": "ReservationNumber",
                  "Value": "xxxxxxxxx"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

This response has no service specific parameters

JSON

copy
{
   "Key": "E3901DFE6C574081BDE223764C39XXXX",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-08-01T12:13:20"
   },
   "RequiredAction": null,
   "Services": null,
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "ServiceCode": "klarna",
   "IsTest": true,
   "ConsumerMessage": null
}

Push


JSON Push response

This response has no service specific parameters

JSON

copy
{
   "DataRequest": {
      "Key": "E3901DFE6C574081BDE223764C39XXXX",
      "Invoice": "testinvoice 123",
      "ServiceCode": "klarna",
      "ActionCode": "CancelReservation",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Transaction successfully processed"
         },
         "SubCode": null,
         "DateTime": "2017-08-01T12:13:20+02:00"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountDebit": 0,
      "Services": null,
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 0,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": null,
      "PayerHash": null,
      "PaymentKey": null
   }
}

UpdateReservation

If a reservation needs to be changed, it is possible to do this via an UpdateReservation request. When updating the products in the reservation, please note that it is only possible to do an updatereservation for the same amount that is reserved or a lower amount. When updating the address information of the customer, please note that this results in Klarna doing a risk check again, with the possibility of being declined.

View in playground

Request


JSON gateway request

ArticleNumber

Number by which the article is identified

ArticleTitle
Required

Name of article

ArticleType

Whether the article is a product or a discount (value = General), a shipping fee (value = ShipmentFee) or a fee for the chosen payment method (value = HandlingFee). This parameter is not required but can be used to place the products in the right order on the invoice that Klarna sends.

ArticlePrice

Price per article (including VAT)

ArticleQuantity

Number of articles

ArticleVat

VAT percentage of article

BillingCareOf

Person/company receiving the invoice on behalf of billed person

BillingCellPhoneNumber

Billing cell phone number

BillingCity

Billing city

BillingCompanyName

Billing company name

BillingCountry

Billing country

BillingEmail

Billing email address

BillingFirstName

Billing first name

BillingLastName

Billing last name

BillingHouseNumber

Billing house number

BillingHouseNumberSuffix

Billing house number suffix

BillingPhoneNumber

Billing phone number (Need minimal phone or mobile)

BillingPostalCode

Billing postal code

BillingStreet

Billing street

ReservationNumber
Required

Klarna reservation number

ShippingCareOf

Person/company receiving the shipment on behalf of the shipping recipient

ShippingCellPhoneNumber

Shipping cell phone number. If Shipping address is provided, then it is required to sent in at least 1 shipping phone number; either ShippingCellPhoneNumber or ShippingPhoneNumber.

ShippingCity

Shipping city

ShippingCompany

Shipping company name

ShippingCountry

Shipping country. Should be the same as Billing country

ShippingEmail

Shipping email address

ShippingFirstName

Shipping first name. Should be the same as Billing first name

ShippingLastName

Shipping last name. Should be the same as Billing last name

ShippingHouseNumber

Shipping house number

ShippingHouseNumberSuffix

Shipping house number suffix

ShippingPhoneNumber

Shipping phone number. If Shipping address is provided, then it is required to sent in at least 1 shipping phone number; either ShippingCellPhoneNumber or ShippingPhoneNumber.

ShippingPostalCode

Shipping postal code

ShippingSameAsBilling

Specifies whether the billing address is the same as the shipping address

ShippingStreet

Shipping street

JSON

copy
{
   "Currency": "EUR",
   "Invoice": "testinvoice 1234",
   "Services": {
      "ServiceList": [
         {
            "Name": "klarna",
            "Action": "UpdateReservation",
            "Parameters": [
               {
                  "Name": "ArticleTitle",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "Blue Toy Car"
               },
               {
                  "Name": "ArticleNumber",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "12345"
               },
               {
                  "Name": "ArticleType",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "General"
               },
               {
                  "Name": "ArticleQuantity",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "1"
               },
               {
                  "Name": "ArticlePrice",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "10.00"
               },
               {
                  "Name": "ArticleVat",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "19"
               },
               {
                  "Name": "BillingFirstName",
                  "Value": "Testperson-nl"
               },
               {
                  "Name": "BillingLastName",
                  "Value": "Approved"
               },
               {
                  "Name": "BillingStreet",
                  "Value": "Neherkade"
               },
               {
                  "Name": "BillingHouseNumber",
                  "Value": "1"
               },
               {
                  "Name": "BillingPostalCode",
                  "Value": "2521VA"
               },
               {
                  "Name": "BillingCity",
                  "Value": "Gravenhage"
               },
               {
                  "Name": "BillingCountry",
                  "Value": "NL"
               },
               {
                  "Name": "BillingCellPhoneNumber",
                  "Value": "0612345678"
               },
               {
                  "Name": "BillingEmail",
                  "Value": "your@email.nl"
               },
               {
                  "Name": "ReservationNumber",
                  "Value": "xxxxxxx"
               },
               {
                  "Name": "ShippingSameAsBilling",
                  "Value": "true"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

JSON

copy
{
   "Key": "AE5CE6004711494C81741182E14Bxxxx",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-08-14T15:06:39"
   },
   "RequiredAction": null,
   "Services": null,
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "ServiceCode": "klarna",
   "IsTest": true,
   "ConsumerMessage": null
}

Push


JSON push response

JSON

copy
{
   "DataRequest": {
      "Key": "AE5CE6004711494C81741182E14Bxxxx",
      "Invoice": "testinvoice 1234",
      "ServiceCode": "klarna",
      "ActionCode": "UpdateReservation",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Transaction successfully processed"
         },
         "SubCode": null,
         "DateTime": "2017-08-14T15:06:39+02:00"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountDebit": 0,
      "Services": null,
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 0,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": null,
      "PayerHash": null,
      "PaymentKey": null
   }
}

GetPClasses

pClasses are product codes generated by Klarna to distinct between the default invoice and alternative products supported via the API.  The individual pClass is related to a merchant, a country and a period. The collection of Pclasses can change or be extended over time. When a transaction request is done for part-payment over a period of 24 months, the product code related to the country and period should be collected either from Klarna or a stored location. To support the collection of the product codes the getPClasses can be used.

View in playground

Request


JSON gateway request

Encoding

Indicates the country where the consumer is registered.

OperatingCountry
Required

Country code for which you want to retrieve pclasses.

JSON

copy
{
   "Currency": "EUR",
   "Services": {
      "ServiceList": [
         {
            "Name": "klarna",
            "Action": "GetPClasses",
            "Parameters": [
               {
                  "Name": "OperatingCountry",
                  "Value": "DE"
               },
               {
                  "Name": "Encoding",
                  "Value": "Germany"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

pclass_{index}_description

Index indicates the description

pclass_{index}_id

Index indicates the id

pclass_{index}_country

Index indicates the country

pclass_{index}_eid

Index indicates the eid

pclass_{index}_expiry_date

Index indicates the expiry date

pclass_{index}_interest_rate

Index indicates the interest rate

pclass_{index}_invoice_fee

Index indicates the invoice fee

pclass_{index}_minimum_purchase_amount

Index indicates the minimum purchase amount

pclass_{index}_months

Index indicates the months

pclass_{index}_startFee

Index indicates the startFee

pclass_{index}_type

Index indicates the type

JSON

copy
{
   "Key": "051847A3ED9D4B5C805E216D8A2Axxxx",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-08-14T15:34:24"
   },
   "RequiredAction": null,
   "Services": [
      {
         "Name": "klarna",
         "Action": null,
         "Parameters": [
            {
               "Name": "pclass_0_description",
               "Value": "Ratenkauf"
            },
            {
               "Name": "pclass_0_id",
               "Value": "3113"
            },
            {
               "Name": "pclass_0_country",
               "Value": "DE"
            },
            {
               "Name": "pclass_0_eid",
               "Value": "5910"
            },
            {
               "Name": "pclass_0_expiry_date",
               "Value": "12/31/9999 11:59:59 PM"
            },
            {
               "Name": "pclass_0_interest_rate",
               "Value": "14.95"
            },
            {
               "Name": "pclass_0_invoice_fee",
               "Value": "1.95"
            },
            {
               "Name": "pclass_0_minimum_purchase_amount",
               "Value": "0"
            },
            {
               "Name": "pclass_0_months",
               "Value": "24"
            },
            {
               "Name": "pclass_0_startFee",
               "Value": "0"
            },
            {
               "Name": "pclass_0_type",
               "Value": "Account"
            }
         ]
      }
   ],
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "ServiceCode": "klarna",
   "IsTest": true,
   "ConsumerMessage": null
}

Pay

When a reservation is accepted, the merchant can send the product to the customer and do an activation of the reservation. The shipment needs to be within 14 days from the reservation date (unless otherwise agreed upon with Klarna). When an order is shipped outside the reservation period and the consumer has not paid during the full collection period, Klarna has the option to revoke the payout to the merchant.

View in playground

Request


JSON gateway request

ReservationNumber
Required

Klarna reservation number

ArticleNumber

Article number as sent in the Reserve request (only required for partial payments)

ArticleQuantity

The number of articles (only required for partial payments)

SendByMail
Required

Invoice to be send by Klarna by mail. Make sure you send either SendByMail or SendByEmail as TRUE. Sending invoices by mail will result in extra costs from Klarna.

SendByEmail
Required

Invoice to be send by Klarna by email. Make sure you send either SendByMail or SendByEmail as TRUE.

JSON

copy
{
   "Currency": "EUR",
   "AmountDebit": 10,
   "Invoice": "testinvoice 123",
   "Services": {
      "ServiceList": [
         {
            "Name": "klarna",
            "Action": "Pay",
            "Parameters": [
               {
                  "Name": "ArticleNumber",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "12345"
               },
               {
                  "Name": "ArticleQuantity",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "1"
               },
               {
                  "Name": "SendByMail",
                  "Value": "false"
               },
               {
                  "Name": "SendByEmail",
                  "Value": "true"
               },
               {
                  "Name": "ReservationNumber",
                  "Value": "2377577xxx"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

This response has no service specific parameters

InvoiceNumber

Invoice number of Klarna to this shipment

JSON

copy
{
   "Key": "CC344AF79CB14DFE96392D083E06xxx",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-08-14T16:39:08"
   },
   "RequiredAction": null,
   "Services": [
      {
         "Name": "klarna",
         "Action": null,
         "Parameters": [
            {
               "Name": "InvoiceNumber",
               "Value": "4170859107094xxxx"
            }
         ]
      }
   ],
   "CustomParameters": null,
   "AdditionalParameters": null,
   "RequestErrors": null,
   "Invoice": "testinvoice 123",
   "ServiceCode": "klarna",
   "IsTest": true,
   "Currency": "EUR",
   "AmountDebit": 10,
   "TransactionType": "C700",
   "MutationType": 1,
   "RelatedTransactions": null,
   "ConsumerMessage": null,
   "Order": null,
   "IssuingCountry": null,
   "StartRecurrent": false,
   "Recurring": false,
   "CustomerName": null,
   "PayerHash": null,
   "PaymentKey": "198B430A761A4BEE93A280EC128Bxxxx"
}

Push


JSON push response

This response has no service specific parameters

InvoiceNumber

Invoice number of Klarna to this shipment

JSON

copy
{
   "Transaction": {
      "Key": "CC344AF79CB14DFE96392D083E06xxxx",
      "Invoice": "testinvoice 123",
      "ServiceCode": "klarna",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Success"
         },
         "SubCode": {
            "Code": "S001",
            "Description": "Transaction successfully processed"
         },
         "DateTime": "2017-08-14T16:39:08"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountDebit": 10,
      "TransactionType": "C700",
      "Services": [
         {
            "Name": "klarna",
            "Action": null,
            "Parameters": [
               {
                  "Name": "InvoiceNumber",
                  "Value": "4170859107094xxxx"
               }
            ],
            "VersionAsProperty": 1
         }
      ],
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 1,
      "RelatedTransactions": null,
      "IsCancelable": false,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": null,
      "PayerHash": null,
      "PaymentKey": "198B430A761A4BEE93A280EC128Bxxxx"
   }
}

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.

View in playground

Request


JSON gateway request

JSON

copy
{
   "Currency": "EUR",
   "AmountCredit": 1.45,
   "Invoice": "100004441",
   "OriginalTransactionKey": "FC693CDE6C4D447094E37633BA8Bxxxx",
   "Services": {
      "ServiceList": [
         {
            "Name": "klarna",
            "Action": "Refund"
         }
      ]
   }
}

Response


JSON gateway response

JSON

copy
{
   "Key": "10C63E926E724A4E8FF53246951Exxxx",
   "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": "100004441",
   "ServiceCode": "klarna",
   "IsTest": true,
   "Currency": "EUR",
   "AmountCredit": 1.45,
   "TransactionType": "C701",
   "MutationType": 1,
   "RelatedTransactions": [
      {
         "RelationType": "refund",
         "RelatedTransactionKey": "FC693CDE6C4D447094E37633BA8Bxxxx"
      }
   ],
   "ConsumerMessage": null,
   "Order": null,
   "IssuingCountry": null,
   "StartRecurrent": false,
   "Recurring": false,
   "CustomerName": null,
   "PayerHash": null,
   "PaymentKey": "608987C866A3462FA5AB550C290Axxxx"
}

Push


JSON push response

JSON

copy
{
   "Transaction": {
      "Key": "10C63E926E724A4E8FF53246951Exxxx",
      "Invoice": "100004441",
      "ServiceCode": "klarna",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Succes"
         },
         "SubCode": {
            "Code": "S001",
            "Description": "Transactie succesvol uitgevoerd"
         },
         "DateTime": "2017-08-14T17:15:33+02:00"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountCredit": 1.45,
      "TransactionType": "C701",
      "Services": null,
      "CustomParameters": null,
      "AdditionalParameters": null,
      "MutationType": 1,
      "RelatedTransactions": [
         {
            "RelationType": "refund",
            "RelatedTransactionKey": "FC693CDE6C4D447094E37633BA8Bxxxx"
         }
      ],
      "IsCancelable": false,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": null,
      "PayerHash": null,
      "PaymentKey": "608987C866A3462FA5AB550C290Axxxx"
   }
}