v1
latestOpenAPI 3.0.02026-07-1462248.4 KBorders
Create a new order
Use this API call to create a new order. Placing an order towards Klarna means that the Klarna Payments session will be closed and that an order will be created in Klarna's system.<br/>When you have received the authorization_token for a successful authorization you can place the order. Among the other order details in this request, you include a URL to the confirmation page for the customer.<br/>When the Order has been successfully placed at Klarna, you need to handle it either through the Merchant Portal or using Klarna’s Order Management API. Read more on Create a new order.
post/payments/v1/authorizations/{authorizationToken}/order
Path parameters
authorizationTokenstring required
Request body
Example request
{
"billing_address": {
"attention": "Attn",
"city": "London",
"country": "GB",
"email": "test.sam@test.com",
"family_name": "Andersson",
"given_name": "Adam",
"phone": "+44795465131",
"postal_code": "W1G 0PW",
"region": "OH",
"street_address": "33 Cavendish Square",
"street_address2": "Floor 22 / Flat 2",
"title": "Mr."
},
"customer": {
"date_of_birth": "1978-12-31",
"gender": "male",
"title": "Mr.",
"type": "organization"
},
"locale": "en-GB",
"merchant_data": "{\"order_specific\":[{\"substore\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}",
"merchant_reference1": "ON4711",
"merchant_reference2": "hdt53h-zdgg6-hdaff2",
"merchant_urls": {
"authorization": "https://www.example-url.com/authorization",
"confirmation": "https://www.example-url.com/confirmation",
"notification": "https://www.example-url.com/notification",
"push": "https://www.example-url.com/push"
},
"order_amount": 2500,
"order_lines": [
{
"image_url": "https://www.exampleobjects.com/logo.png",
"merchant_data": "{\"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\"}]}",
"name": "Running shoe",
"product_identifiers": {
"brand": "shoe-brand",
"category_path": "Shoes > Running",
"color": "white",
"global_trade_item_number": "4912345678904",
"manufacturer_part_number": "AD6654412-334.22",
"size": "small"
},
"product_url": "https://.../AD6654412.html",
"quantity": 1,
"quantity_unit": "pcs",
"reference": "AD6654412",
"tax_rate": 1900,
"total_amount": 2500,
"total_discount_amount": 500,
"total_tax_amount": 475,
"type": "physical",
"unit_price": 2500
}
],
"order_tax_amount": 475,
"payment_method_categories": [
{
"asset_urls": {
"descriptive": "https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg",
"standard": "https://x.klarnacdn.net/payment-method/assets/badges/generic/klarna.svg"
},
"identifier": "klarna",
"name": "Pay with Klarna"
}
],
"purchase_country": "GB",
"purchase_currency": "GBP",
"shipping_address": {
"attention": "Attn",
"city": "London",
"country": "GB",
"email": "test.sam@test.com",
"family_name": "Andersson",
"given_name": "Adam",
"phone": "+44795465131",
"postal_code": "W1G 0PW",
"region": "OH",
"street_address": "33 Cavendish Square",
"street_address2": "Floor 22 / Flat 2",
"title": "Mr."
},
"status": "complete"
}Response
Order was successfully created.
Example response
{
"redirect_url": "https://credit.klarna.com/v1/sessions/0b1d9815-165e-42e2-8867-35bc03789e00/redirect"
}