
Klarna
Integration
Redirect your customers to the Klarna payment portal via our Hosted Checkout Page. Find a high level overview in the "Process flows" chapter.
Add the following properties to a standard CreateHostedCheckout request:
{
"order":{
"amountOfMoney":{
"currencyCode":"EUR",
"amount":2980
},
"shipping":{
"address":{
"name":{
"title":"Miss",
"firstName":"Road",
"surname":"Runner"
},
"street":"Neptunusstraat",
"houseNumber":"13b",
"zip":"2132JA",
"city":"Hoofddorp",
"countryCode":"NL"
}
},
"customer":{
"personalInformation":{
"name":{
"title":"Mr.",
"firstName":"Wile",
"surnamePrefix":"E.",
"surname":"Coyote"
},
"dateOfBirth":"19490917"
},
"locale":"en-NL",
"billingAddress":{
"street":"Neptunusstraat",
"houseNumber":"13b",
"zip":"2132JA",
"city":"Hoofddorp",
"countryCode":"NL"
},
"contactDetails":{
"emailAddress":"Johnia.Doe@outlook.com",
"phoneNumber":"0636469107"
}
},
"shoppingCart":{
"items":[
{
"amountOfMoney":{
"currencyCode":"EUR",
"amount":2500
},
"invoiceData":{
"description":"ACME Super Outfit"
},
"orderLineDetails":{
"productName":"ACME12",
"discountAmount":0,
"productCode":"ASO45",
"productPrice":500,
"productType":"CLOTH",
"quantity":5,
"taxAmount":0,
"unit":"piece"
}
},
{
"amountOfMoney":{
"currencyCode":"EUR",
"amount":480
},
"invoiceData":{
"description":"Asperin"
},
"orderLineDetails":{
"productName":"ASPIRIN",
"discountAmount":0,
"productCode":"ASP01",
"productPrice":480,
"productType":"MEDIC",
"quantity":1,
"taxAmount":0,
"unit":"piece"
}
}
]
}
},
"hostedCheckoutSpecificInput":{
"returnUrl":"https://yourShopUrl.com"
},
"redirectPaymentMethodSpecificInput":{
"paymentProductId":3301
}
}
Properties | Remarks |
---|---|
order.customer.contactDetails emailAddress phoneNumber |
Your customer's e-mail address/phone number |
shipping.address.name
name street zip |
Your customer's shipping address |
customer surnamePrefix surname dateOfBirth |
Your customer's personal information |
billingAddress street city countryCode |
Your customer's billing address |
shoppingCart.items amountOfMoney invoiceData.description productCode productPrice productType quantity unit |
The content of the shopping cart as an array of items objects amountOfMoney.amount: The full amount of the items, calculated as orderLineDetails.productPrice X orderLineDetails.quantity Make sure to calculate the value for order.amountOfMoney.amount by adding up all instances of shoppingCart.items.amountOfMoney.amount |
hostedCheckoutSpecificInput returnURL |
returnUrl : The URL we redirect your customers to after the payment has been finalised |
redirectPaymentMethodSpecificInput.paymentProductId |
The numeric identifier of the payment method on our platform. Find this id in the list below. It instructs our platform to send your customers directly to the Klarna portal. If left out, our platform sends your customers to the Hosted Checkout Page instead, allowing them to choose this or any other payment method in your account |
Find detailed information about this object and its properties in our HostedCheckoutAPI
List of available Klarna payment methods
Payment method | paymentProductId |
---|---|
Pay Now (customers select either Bank Transfer or Direct Debit on their own) | 3301 |
Pay Now (Bank Transfer) Pay Later (Bank transfer) |
3304 |
Pay Now (Direct Debit) | 3305 |
Pay Later Pay Later (Pay in 3) |
3302 |
Financing Financing (Pay in 3) |
3303 |