Klarna

Klarna allows your customers to elect to pay in 3 equal instalments for any goods they have selected from your website. You can opt in to this by applying for the feature in the Merchant Portal.

Klarna Integration fields

Klarna processing requires some additional information to be passed in the Payment Request which are marked as Conditional in their description elsewhere in this guide. For clarity, these objects and arrays are referenced below as well, to provide clearer guidance on the implementation of Klarna for anyone currently using the solution.

Klarna fields
Field NameLocationDescription
titlecustomerDetails.billingAddressCardholder's title.This field is Optional and is restricted to these values:
MrDesignates a Male cardholder.
MsDesignates a Female cardholder.
citycustomerDetails.billingAddressCity of the cardholders billing address.

This field is Mandatory
titlecustomerDetails.deliveryDetails.deliveryAddressCardholder's title.This field is Optional and is restricted to these values:
MrDesignates a Male cardholder.
MsDesignates a Female cardholder.
citycustomerDetails.deliveryDetails.deliveryAddressCity of the cardholders delivery address.

This field is Mandatory
orderLinespaymentRequestThis array can contain multiple objects, each one containing several Mandatory and Optional fields. These are detailed fully within the Payment Request section of this guide.
attachmentpaymentRequestThis field is a serialised JSON Object string, which should contain the information as per the object schema. Details on this schema are included below in the Attachment Field Details section of this page.

This data should be supplied IF available.
Failure to do so may result in lower payment acceptance.
Advertising your Klarna Acceptance

Klarna is a form of credit so has some usage guidelines around how it should be promoted on your website. Klarna make these guidelines available online for you to use and follow. We strongly recommend reading through their UK marketing guidelines.

Klarna in Checkout already meets the payment application requirements that are required for this Alternate Payment Method. Once configured, it can be used without any further amendments to your website. Klarna also provide optional guidance and tools however, which are designed to maximise payment acceptance using this Payment Method.


Attachment Field Details

Schema Usage

Klarna maintain the schema for the attachment field at:

https://developers.klarna.com/api/specs/attachment-schema.json

This schema can be checked by using a HTTP GET sent to the endpoint and we recommend that you use this method to ensure you are always using the most up to date schema for this field. The table below summarises the usage guidance for each attachment option, and is followed by the Schema examples in JSON format, at time of publishing.

PropertyDescription
air_reservation_detailsDetails about the reservation of airline tickets.
bus_reservation_detailsDetails about the reservation of bus tickets.
train_reservation_detailsDetails about the reservation of train tickets.
ferry_reservation_detailsDetails about the reservation of ferry tickets.
hotel_reservation_detailsDetails about the reservation of hotel rooms.
car_rental_reservation_detailsDetails about the reservation of rental cars.
eventDetails about the event, show or gig.
voucherDetails about the voucher and its intended use.
subscriptionDetails about the product or service being subscribed to.
marketplace_seller_infoDetails about the seller, if the purchase is via a marketplace e.g. Ebay.
marketplace_winner_infoDetails about the buyer, if the purchase is via a marketplace e.g. Ebay.
customer_account_infoDetails about the customer who holds an account with the merchant.
payment_history_fullDetails about the payment history of the buyer.
payment_history_simpleA summary of the payment history of the buyer.
other_delivery_addressDetails of any alternative delivery addresses being requested by the buyer.

Serialised JSON Object string example

"{\"customer_account_info\":[{\"unique_account_identifier\":\"test@gmail.com\",\"account_registration_date\":\"2017-02-13T10:49:20Z\",\"account_last_modified\":\"2019-03-13T11:45:27Z\"}]}"

You can find more information on serialising JSON Objects into strings at Newtonsoft.com. The below Schema can be used to validate your JSON Object prior to serialising it, but the full schema can be viewed here.

Attachment JSON Schema 1

air_reservation_details
{
"description": "Details about the reservation of airline tickets",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"pnr":
{
"description": "Trip booking number, e.g. VH67899",
"type": "string"
},
"itinerary":
{
"description": "Itinerary data, one per segment",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"departure":
{
"description": "IATA Airport Code (three letters)",
"minLength": 3,
"maxLength": 3,
"type": "string"
},
"departure_city":
{
"type": "string"
},
"arrival":
{
"description": "IATA Airport Code (three letters)",
"minLength": 3,
"maxLength": 3,
"type": "string"
},
"arrival_city":
{
"type": "string"
},
"carrier":
{
"description": "IATA Airline standard (two letters or digits)",
"type": "string"
},
"segment_price":
{
"description": "Local currency",
"type": "number"
},
"departure_date":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time",
"pattern": "^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9](:[0-5][0-9]){0,1}Z{0,1}$"
},
"ticket_delivery_method":
{
"enum":
[
"pick_up",
"email",
"post",
"phone"
]
},
"ticket_delivery_recipient":
{
"description": "The name of the recipient the ticket is delivered to. If email or phone, then use either the email address or the phone number.",
"type": "string"
},
"passenger_id":
{
"type": "array",
"items":
{
"type": "integer"
}
},
"class":
{
"type": "string"
}
}
}
},
"insurance":
{
"description": "Insurance data",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"insurance_company":
{
"type": "string"
},
"insurance_type":
{
"enum":
[
"cancellation",
"travel",
"cancellation_travel",
"bankruptcy"
]
},
"insurance_price":
{
"description": "Local currency",
"type": "number"
}
}
}
},
"passengers":
{
"description": "Passengers data",
"type": "array",
"items":
{
"name": "Person",
"type": "object",
"properties":
{
"id":
{
"type": "integer"
},
"title":
{
"description": "Mr, Mrs, Ms or blank if under 12 years",
"enum":
[
"mr",
"mrs",
"ms",
""
]
},
"first_name":
{
"type": "string"
},
"last_name":
{
"type": "string"
}
}
}
},
"affiliate_name":
{
"description": "Name of the affiliate that originated the purchase. If none, leave blank.",
"type": "string"
}
}
}
}

Attachment JSON Schema 2

marketplace_seller_info
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"unique_account_identifier_seller":
{
"type": "object",
"properties":
{
"email":
{
"type": "string",
"required": true
},
"pno":
{
"type": "string",
"required": true
},
"other":
{
"type": "string"
}
}
},
"sub_merchant_id":
{
"description": "Name or unique number of the selling / delivering merchant, e.g. \"Marketbrick Ltd.\"",
"type": "string"
},
"product_category":
{
"description": "Name of the overall category to which the specific good(s) belong to, according to the selling merchants categorization. E.g. \"Computers\"",
"type": "string"
},
"product_name":
{
"description": "Name of the specific good purchased, e.g. \"Acer 5400\"",
"type": "string"
},
"account_registration_date":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time"
},
"account_last_modified":
{
"type": "object",
"properties":
{
"password":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time",
"pattern": "^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9](:[0-5][0-9]){0,1}Z{0,1}$"
},
"email":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time",
"pattern": "^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9](:[0-5][0-9]){0,1}Z{0,1}$"
},
"listing":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time",
"pattern": "^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9](:[0-5][0-9]){0,1}Z{0,1}$"
},
"login":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time",
"pattern": "^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9](:[0-5][0-9]){0,1}Z{0,1}$"
},
"address":
{
"description": "ISO 8601 e.g. 2012-11-24T15:00",
"type": "string",
"format": "date-time",
"pattern": "^[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9](:[0-5][0-9]){0,1}Z{0,1}$"
}
}
},
"seller_rating":
{
"description": "Current rating. Partner should provide upfront their rating scale, e.g. 65",
"type": "number"
},
"number_of_trades":
{
"description": "Number of trades the sub-merchant did since 12 months back, e.g. 23",
"type": "integer"
},
"volume_of_trades":
{
"description": "Volumes of trades the sub-merchant did since 12 months back, e.g. 230.5",
"type": "integer"
}
}
}
}