Klarna Docs - Post delivery

Post delivery

Manage your orders after they have been shipped

Prerequisites

  • You have already obtained your API credentials
  • You have captured the amount stated in the delivery page

Tip: You can read more in-depth technical content on the API reference page.

Retrieve a capture

Retrieving all information related to a capture, e.g. shipping/billing information or order lines that were captured.

Use case

You need to view what information is related to a shipped item.

Retrieve the capture information from Klarna

Send in the order id and the specific capture id you want to know more about.

HTTP
GET /ordermanagement/v1/orders/{order_id}/captures/{capture_id}
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

200 - OK - The server has fulfilled the request and the capture information is returned

JSON
HTTP/1.1 200 OK
Content-Type: application/json

{
  "capture_id": "5b33ed47-79d0-4d76-99ea-4afaa7c8e552",
  "klarna_reference": "4K7Q6QF6-1",
  "captured_amount": 6000,
  "captured_at": "2017-01-10T10:31:17.973Z",
  "description": "Shipped the full order",
  "order_lines": [

Add new shipping information to a capture

Shipping information can be attached to a capture, this will help you and us to keep track of orders sent to the customer.

Read more about delivery tracking.

Use case

You have made a capture of your order, now after sending the order you want to add the shipping details.

Add the shipping information and make the API call

Send in the shipping details and add them to a specific capture.

JSON
POST /ordermanagement/v1/orders/{order_id}/captures/{capture_id}/shipping-info
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

{
  "shipping_info": [
    {
      "shipping_company": "DHL US",
      "tracking_number": "1234567890",
      "return_shipping_company": "UPS",

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

201 - Created - The server has fulfilled the request

Trigger a new send out of customer communication

Trigger a new send out of customer communication and settlement details. Typically used to inform customers about changes to their order. This triggers an email to the customer with the latest details.

Use case

The customer did not receive the payment instruction or invoice as expected and you want to re-send the information.

Make the API call and trigger a new send out

HTTP
POST /ordermanagement/v1/orders/{order_id}/captures/{capture_id}/trigger-send-out
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

204 - No Content - The server has fulfilled the request

In case of a 404 response, the response body will indicate whether the order or capture was not found

Refund an amount of a captured order

Refund an amount of a captured order. The refunded amount will be credited back to the customer. The refunded amount must not be higher than captured_amount. The refunded amount can optionally be accompanied by a descriptive text and order lines. Sending updated order lines allows Klarna to visualize what was refunded to the customer.

In case of multiple captures (shipments), allocating the refund to the right customer payment instruction requires consistent order lines. Find all the details here.

Use case

The customer sends item(s) back and you need to refund the customer with the specific amount.

Add new amount and make API call

JSON
POST /ordermanagement/v1/orders/{order_id}/refunds
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

{
  "refunded_amount": 3000,
  "description": "Refunding half the tomatoes",
  "order_lines": [
    {
      "type": "physical",

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

201 - Created - The server has fulfilled the request

Release the remaining authorisation for an order

Signal that there is no intention to perform further captures and remaining amount should be released. If the purchase was made by card then Klarna will refund the remaining authorisation to the customer.

Use case

You and the customer are happy with the delivery and you have no need to change or update the order. The custumer should thus not be debited for the remaining order amount, if the custumer has paid by card the remaining amount should be refunded to the customer.

Get the order id and make the API call

You need the specific order id to release the remaining authorization.

HTTP
POST /ordermanagement/v1/orders/{order_id}/release-remaining-authorization
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

204 - No Content - The server has fulfilled the request

Extend the customer’s payment due date to Klarna

Give the customer more time to pay for their purchase by extending the order’s due date. This feature is available for orders where the customer has chosen a pay later product, such as Pay in 30 days or Pay in 4 instalments.

Pricing

Please note that this is a paid feature. Due to the increased credit cost for Klarna, we take a fee for the payment time extension. Find the full pricing information here.

Use case

Accidents and mistakes happen. Have you shipped the wrong goods? Or, were the goods broken when they reached your customer? Regardless of the reason, the customer rightfully deserves some extra time to pay for their purchase. In such cases, the customer’s payment due date can be extended.

Here’s how it works:

Please note that extending the payment due date is made on capture (shipment) level. This is because Klarna associates every capture with an individual invoice for the customer.

Make the API call to get the available options for extending the due date

HTTP
GET /ordermanagement/v1/orders/{order_id}/capture/{capture_id}/extend-due-date-options
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

In case of a 404 response, the response body will indicate whether the order or capture was not found

200 - OK - The server has fulfilled the request. Please note that fees may be empty, meaning no options are currently available.

JSON
HTTP/1.1 200 OK
Content-Type: application/json

{
  "currency": "SEK",
  "options": [
    {
      "number_of_days": 2
      "amount": 0
    },

Use one of the retrieved options and make the API call to extend the due date

JSON
POST /ordermanagement/v1/orders/{order_id}/capture/{capture_id}/extend-due-date
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Content-Type: application/json

{
    "number_of_days": 2
}

Handle the response from Klarna

Klarna will respond with one of the following:

Error message - something went wrong

In case of a 404 response, the response body will indicate whether the order or capture was not found

204 - No Content - The server has fulfilled the request.