Klarna Docs - Delivery

Delivery

The section describes how you could capture an order. When an order is captured, you confirm that the order has been fulfilled. This means that you've shipped the ordered goods to your customers and shoppers. At the same time, it lets us know that we should trigger a payout towards you according to your payout setup, and charge your customer for the order amount. An expired order can no longer be captured.

Prerequisites

  • You have already obtained your API credentials.
  • A purchase has been made.
  • You have retrieved and acknowledge an order as described on the Confirm purchase page

Capture the full amount

Use this call when fulfilment is completed, e.g. physical products are being shipped to the customer.

Use case

You have sent the goods to the customer and want to capture the amount for the item(s). This will trigger the settlement from Klarna to you for the order, in accordance with the terms of your contract.

Add the order information and make the API call.

The captured_amount must be equal to or less than the order’s remaining_authorized_amount. The shipping address is inherited from the order.

The capture amount can optionally be accompanied by descriptive text and order lines for the captured items.

Shipping Information:
If you are shipping physical goods, you should have tracking information available at this point. Therefore, the capture call provides the possibility to transmit the tracking data for the shipment to Klarna. Read more about delivery tracking.

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

{
  "captured_amount": 6000,
  "description": "Shipped the full order",
  "order_lines": [
    {
      "type": "physical",

Handle the response from Klarna

Klarna will respond with 201. Created or an error message

HTTP
HTTP/1.1 201 Created
Location: http://klarna/orders/{order_id}/captures/{capture_id}

Capture part of the order amount

Use this call when part of the fulfilment is completed, e.g. for some, but not all, of the physical goods are shipped to the customer.

Use case

You have sent at least part of the order to the customer and want to capture the amount for the item(s) that have been shipped.

Add the order information and make the API call.

The captured_amount must be equal to or less than the order’s remaining_authorized_amount. The shipping address is inherited from the order.

The capture amount can optionally be accompanied by descriptive text and order lines for the captured items. Adding order lines enables Klarna to visualize the settlement details for the customer better.

Shipping Information:
If you are shipping physical goods, you should have tracking information available at this point. Therefore, the capture call provides the possibility to transmit the tracking data for the shipment to Klarna. 

Read more about delivery tracking.

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

{
  "captured_amount": 1200,
  "description": "Shipped part of the order",
  "order_lines": [
    {
      "type": "physical",

Handle the response from Klarna

Klarna will respond with 201. Created or an error message

HTTP
HTTP/1.1 201 Created
Location: http://klarna/orders/{order_id}/captures/{capture_id}

What’s next?

You have now implemented all the features you need to handle your delivery process, you can now continue to implement the post delivery calls.