Klarna
Klarna Payments is an alternative payment method that complements your checkout with Pay Later, Instalments, and Pay Now options. In addition to processing payments, Klarna Payments integration also offers real-time credit decisioning and fraud detection services out of the box. In order to enable Klarna Payments you will need to apply for a Klarna merchant account which you can do via the Merchant Portal.
Please discuss how to enable Klarna payments with your Account Manager. They will be able to guide you through the process and pricing for your Klarna experience.
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 Name | Location | Description | ||||
title | customerDetails.billingAddress | Cardholder's title.This field is Optional and is restricted to these values:
| ||||
city | customerDetails.billingAddress | City of the cardholders billing address. This field is Mandatory | ||||
phone | customerDetails.billingAddress | Phone number of the cardholders billing address. This field is Mandatory | ||||
title | customerDetails.deliveryDetails.deliveryAddress | Cardholder's title.This field is Optional and is restricted to these values:
| ||||
city | customerDetails.deliveryDetails.deliveryAddress | City of the cardholders delivery address. This field is Mandatory | ||||
orderLines | paymentRequest | This 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. | ||||
amountBreakdown | paymentRequest | This object contains several objects related to Klarna processing. Each of these can contain several amount fields which breakdown the total sales value into sub amounts. This object is optional for Klarna. | ||||
shipping | amountBreakdown | This object contains the totalAmount field only. This optional field should be the total amount of shipping for this order. | ||||
discount | amountBreakdown | This object contains the totalAmount field only. This optional field should be the total amount of discount for this order. | ||||
attachment | paymentRequest | This 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. |
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
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.
Property | Description |
---|---|
air_reservation_details | Details about the reservation of airline tickets. |
bus_reservation_details | Details about the reservation of bus tickets. |
train_reservation_details | Details about the reservation of train tickets. |
ferry_reservation_details | Details about the reservation of ferry tickets. |
hotel_reservation_details | Details about the reservation of hotel rooms. |
car_rental_reservation_details | Details about the reservation of rental cars. |
event | Details about the event, show or gig. |
voucher | Details about the voucher and its intended use. |
subscription | Details about the product or service being subscribed to. |
marketplace_seller_info | Details about the seller, if the purchase is via a marketplace e.g. Ebay. |
marketplace_winner_info | Details about the buyer, if the purchase is via a marketplace e.g. Ebay. |
customer_account_info | Details about the customer who holds an account with the merchant. |
payment_history_full | Details about the payment history of the buyer. |
payment_history_simple | A summary of the payment history of the buyer. |
other_delivery_address | Details 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
- Bus
- Train
- Ferry
- Hotel
- Car
- Event
- Voucher
- Subscription
{
"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"
}
}
}
}
{
"description": "Details about the reservation of bus 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": "City code or name",
"type": "string"
},
"departure_city":
{
"type": "string"
},
"arrival":
{
"description": "City code or name",
"type": "string"
},
"arrival_city":
{
"type": "string"
},
"carrier":
{
"description": "Name of transportation company",
"type": "string"
},
"segment_price":
{
"description": "Local currency",
"type": "integer"
},
"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"
}
}
}
}
{
"description": "Details about the reservation of train 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": "City code or name",
"type": "string"
},
"departure_city":
{
"type": "string"
},
"arrival":
{
"description": "City code or name",
"type": "string"
},
"arrival_city":
{
"type": "string"
},
"carrier":
{
"description": "Name of transportation company",
"type": "string"
},
"segment_price":
{
"description": "Local currency",
"type": "integer"
},
"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"
}
}
}
}
{
"description": "Details about the reservation of ferry 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": "City code or name",
"type": "string"
},
"departure_city":
{
"type": "string"
},
"arrival":
{
"description": "City code or name",
"type": "string"
},
"arrival_city":
{
"type": "string"
},
"carrier":
{
"description": "Name of transportation company",
"type": "string"
},
"segment_price":
{
"description": "Local currency",
"type": "integer"
},
"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"
}
}
}
}
{
"description": "Details about the reservation of hotel rooms",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"pnr":
{
"description": "Trip booking number, e.g. VH67899",
"type": "string"
},
"hotel_itinerary":
{
"description": "Hotel itinerary data, one per hotel stay",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"hotel_name":
{
"description": "Name of hotel",
"type": "string"
},
"address":
{
"type": "object",
"properties":
{
"street_address":
{
"type": "string"
},
"postal_code":
{
"type": "string"
},
"city":
{
"type": "string"
},
"country":
{
"type": "string"
}
}
},
"start_time":
{
"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}$"
},
"end_time":
{
"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}$"
},
"number_of_rooms":
{
"type": "integer"
},
"passenger_id":
{
"type": "array",
"items":
{
"type": "integer"
}
},
"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"
},
"hotel_price":
{
"description": "Local currency",
"type": "number"
},
"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"
}
}
}
}
{
"description": "Details about the reservation of rental cars",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"pnr":
{
"description": "Trip booking number, e.g. VH67899",
"type": "string"
},
"car_rental_itinerary":
{
"description": "Car rental itinerary data",
"type": "array",
"items":
{
"type": "object",
"properties":
{
"rental_company":
{
"description": "Name of rental company",
"type": "string"
},
"drivers_id":
{
"type": "array",
"items":
{
"type": "integer"
}
},
"pick_up_location":
{
"type": "object",
"properties":
{
"street_address":
{
"type": "string"
},
"postal_code":
{
"type": "string"
},
"city":
{
"type": "string"
},
"country":
{
"type": "string"
}
}
},
"start_time":
{
"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}$"
},
"drop_off_location":
{
"type": "object",
"properties":
{
"street_address":
{
"type": "string"
},
"postal_code":
{
"type": "string"
},
"city":
{
"type": "string"
},
"country":
{
"type": "string"
}
}
},
"end_time":
{
"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}$"
},
"car_price":
{
"description": "Local currency",
"type": "number"
},
"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"
}
}
}
},
"drivers":
{
"type": "array",
"items":
{
"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"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"event_name":
{
"description": "Name of the event, e.g. \"Fancy Singer\"",
"type": "string"
},
"event_company":
{
"description": "Name of the company arranging the event, e.g. \"Happy Parties Ltd.\"",
"type": "string"
},
"genre_of_event":
{
"description": "Category or type of venue, \"Pop\"",
"type": "string"
},
"arena_name":
{
"description": "Name of the venue, \"Song Arena\"",
"type": "string"
},
"arena_location":
{
"description": "Location of the arena.",
"name": "Location",
"type": "object",
"properties":
{
"street_address":
{
"type": "string"
},
"postal_code":
{
"type": "string"
},
"city":
{
"type": "string"
},
"country":
{
"type": "string"
}
}
},
"start_time":
{
"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}$"
},
"end_time":
{
"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}$"
},
"access_controlled_venue":
{
"description": "Tickets are digitally checked when enetering the venue",
"type": "boolean"
},
"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"
},
"affiliate_name":
{
"description": "Name of the affiliate that originated the purchase. If none, leave blank.",
"type": "string"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"voucher_name":
{
"description": "Description of the product the voucher entitles to, e.g. \"China trip\"",
"type": "string"
},
"voucher_company":
{
"description": "Name of the company that will provide good / service upon voucher (not the same as the selling merchant), e.g. \"Sun Trips Ltd.\"",
"type": "string"
},
"start_time":
{
"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}$"
},
"end_time":
{
"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}$"
},
"affiliate_name":
{
"description": "Name of the affiliate that originated the purchase. If none, leave blank.",
"type": "string"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"subscription_name":
{
"description": "Name of the product on subscription, e.g. \"Contact lenses\"",
"type": "string"
},
"start_time":
{
"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}$"
},
"end_time":
{
"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}$"
},
"auto_renewal_of_subscription":
{
"description": "Info whether the subscription will be auto renewed upon expiry.",
"type": "boolean"
},
"affiliate_name":
{
"description": "Name of the affiliate that originated the purchase. If none, leave blank.",
"type": "string"
}
}
}
}
Attachment JSON Schema 2
- Marketplace Seller
- Marketplace Winner
- Customer Account Info
- Full Payment History
- Basic Payment History
- Other Delivery
{
"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"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"unique_account_identifier_winner":
{
"type": "object",
"properties":
{
"email":
{
"type": "string",
"required": true
},
"pno":
{
"type": "string",
"required": true
},
"other":
{
"type": "string"
}
}
},
"account_registration_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}$"
},
"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}$"
}
}
},
"number_of_trades":
{
"description": "Number of trades the winner did since 12 months back, e.g. 5",
"type": "integer"
},
"volume_of_trades":
{
"description": "Volume of trades the winner did since 12 months back, 230.5",
"type": "integer"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"properties":
{
"unique_account_identifier":
{
"description": "Unique name / number to identify the specific customer account. Max 24 characters. E.g. \"Adam Adamsson\"",
"type": "string"
},
"account_registration_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}$"
},
"account_last_modified":
{
"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}$"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"additionalProperties": false,
"properties":
{
"unique_account_identifier":
{
"description": "Unique name / number to identify the specific customer account. Max 24 characters. E.g. \"Adam Adamsson\"",
"type": "string"
},
"payment_option":
{
"type": "string",
"enum":
[
"card",
"direct banking",
"non klarna credit",
"sms",
"other"
]
},
"number_paid_purchases":
{
"description": "Total number of successful purchases",
"type": "integer"
},
"total_amount_paid_purchases":
{
"description": "Total amount of successful purchases (local currency), e.g. 1234.00",
"type": "number"
},
"date_of_last_paid_purchase":
{
"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}$"
},
"date_of_first_paid_purchase":
{
"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}$"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"additionalProperties": false,
"properties":
{
"unique_account_identifier":
{
"description": "Unique name / number to identify the specific customer account. Max 24 characters. E.g. \"Adam Adamsson\"",
"type": "string"
},
"paid_before":
{
"description": "Whether the customer has paid before or not",
"type": "boolean"
}
}
}
}
{
"type": "array",
"items":
{
"type": "object",
"additionalProperties": false,
"properties":
{
"shipping_method":
{
"enum":
[
"store pick-up",
"pick-up point",
"registered box",
"unregistered box"
]
},
"shipping_type":
{
"enum":
[
"normal",
"express"
]
},
"first_name":
{
"type": "string"
},
"last_name":
{
"type": "string"
},
"street_address":
{
"type": "string"
},
"street_number":
{
"type": "string"
},
"postal_code":
{
"type": "string"
},
"city":
{
"type": "string"
},
"country":
{
"type": "string"
}
}
}
}
Example Request Code
The below code is a complete Payment Request which includes all the fields required for Klarna as an Alternative Payment Method. Please refer to the full Payment Request page for guidance on adding additional payment methods to this request.
window.DNAPayments.openPaymentPage(
{
currency: 'GBP',
description: 'CarService',
paymentSettings: {
terminalId: 'a398d836-aeae-44e8-90b3-6726ecbdb608',
returnUrl: 'https: //test-pay.dnapayments.com/checkout/success.html',
failureReturnUrl: 'https: //test-pay.dnapayments.com/checkout/failure.html',
callbackUrl: 'https: //pay.dnapayments.com/checkout',
failureCallbackUrl: 'https: //testmerchant/order/1123/fail'
},
customerDetails: {
accountDetails: {
accountId: 'uuid000001',
accountPurchaseCount: 4,
paymentAccountAgeIndicator: '05',
suspiciousAccountActivity: '01'
},
billingAddress: {
firstName: 'John',
lastName: 'Doe',
addressLine1: '12 FulhamRd',
postalCode: 'SW61HS',
city: 'London',
phone: '44-07123456789',
country: 'GB'
},
deliveryDetails: {
deliveryAddressUsageIndicator: '04',
deliveryIndicator: '01',
deliveryAddress: {
firstName: 'John',
lastName: 'Doe',
streetAddress1: '12 FulhamRd',
streetAddress2: 'Fulham',
postalCode: 'SW61HS',
city: 'London',
phone: '44-07123456789',
country: 'GB'
}
},
email: 'demo@dnapayments.com',
mobilePhone: '44-07123456789'
},
orderLines: [
{
name: 'Runningshoe',
quantity: 1,
unitPrice: 120,
taxRate: 20,
totalAmount: 120,
totalTaxAmount: 20,
imageUrl: 'https: //www.exampleobjects.com/logo.png',
productUrl: 'https: //.../AD6654412.html'
},
{
name: 'Tracksuit',
quantity: 2,
unitPrice: 30,
taxRate: 20,
totalAmount: 60,
totalTaxAmount: 10,
imageUrl: 'https: //www.exampleobjects.com/logo2.png',
productUrl: 'https: //.../AD6654125.html'
}
],
amount: 24,
amountBreakdown: {
shipping: {
totalAmount: 2
},
discount: {
totalAmount: 2
}
},
attachment: '{\"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\"}]}',
auth: {
access_token: 'qy/ZWj049WHUZj+8i1pUwmYxswo4GXK+Z5',
expires_in: 7200,
scope: 'payment integration_seamless',
token_type: 'Bearer'
}
)