Learn about the details of the calls that let you view and edit your orders. For each call, you can find a description, technical details, and sample requests and responses.
Use the Order management API to check the details of an order.
When you want to check the details of an order, this API call provides you with order information like address, date, amount, purchase country, and status.
To check the order details, send a GET
request to the {apiUrl}/ordermanagement/v1/orders/{order_id}
endpoint. Provide the order id you want to revise as an {order_id}
path parameter. The order_id
is the identifier you get in a successful response when placing a new order.
You can check these details for up to three years after an order is created.
In response to your call, you receive a data object containing the order details.
If the order id in your request is invalid, you get an error response. Ensure the order_id
value you provided is correctly formatted.
You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal logs app section.
Ready to send this request? See the API reference of this call.
Use the Order management API to update the total amount of an order before it is captured, canceled, or expired.
When your customer contacts you to change, add, or remove a product from the order and you need to update the total order amount, this API call enables you to make the required changes.
The updated amount replaces the original order amount, including the order lines if you sent them when creating an order.
The following diagram depicts how this API call works:
You can only update the amount if the order meets the following conditions:
Supported payment method | Identifier | Available markets |
---|---|---|
Pay later | INVOICE | All (excluding CH) |
Pay later | B2B_INVOICE | All (excluding CH) |
Base account | BASE_ACCOUNT | All (excluding CH) |
Pay now | DIRECT_DEBIT | All (excluding CH) |
Fixed amount | FIXED_AMOUNT | AT, DE, DK, FI, FR, NL, NO & SE |
To update the order amount, send the updated order details in a PATCH request to the {apiUrl} /ordermanagement/v1/orders/{order_id}/authorization endpoint. The order_id is the identifier you get in a successful response when placing a new order.
Include the following in your request:
We recommend you always send updated order lines to improve the customer experience. The order lines can later help your customer visualize their purchase in the Klarna app and in the invoice.
The original order lines will be deleted if you don't send order lines in this call.
If the request is successful, the order amount is updated, and you'll receive a 204 No content
response.
If your request contains errors, you'll receive an error response. Make sure your request meets the conditions for updating the order and the parameters are correct. You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal Logs section.
Ready to send this request? See the API reference of this call.
Use the Order management API to update the order ID (merchant references).
When you want to use your own order ID or make any change to the order ID we provide, you have to send an API call to update the merchant references.
A merchant reference is the order number you assign to the order in your system, different from the default one we provide when creating the order. Your customers can use the merchant reference identifier to inquire about the purchase they made in your store.
When you update the merchant reference, we don't create a new Klarna order_id.
The merchant reference is the order_id
from your system.
To update the merchant references, send the updated references in a PATCH
request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/merchant-references
.
The order_id
is the identifier you get in a successful response when placing a new order.
You can update one or both references (merchant_reference1
and merchant_reference2
). You can also clear a reference by setting its value to "" (empty string). You can use either one or both merchant references. The parameter merchant_reference1
is the order id from your system.
If the request is successful, the merchant reference is updated, and you'll receive a 204 No content response.
If your request contains errors, you'll receive an error response. Make sure the order_id
is correct. You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal Logs section.
Ready to send this request? See the API reference of this call.
Use the Klarna order management API to update your customer's shipping address.
When your customer wants to change their shipping address, you have to send an API request to change the address associated with that order.
After you update this information, the customer undergoes another credit check.
You can’t update the billing address anymore due to changes in our risk assessment.
To update the customer's shipping address, send the updated addresses in a PATCH
request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/customer-details
. The order_id
is the identifier you get in a successful response when placing a new order.
To clear a field, set its value to “” (empty string). However, you can't clear mandatory fields. Refer to the Order management API reference to learn which fields are mandatory.
If the request is successful, the order is updated, and you'll receive a 204 No content
response.
If your request contains errors, you'll receive an error response. It can be due to our risk assessment.
Also, make sure the order_id
is correct. You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal Logs section.
Ready to send this request? See the API reference of this call.
Use the Order management API to add shipping information to an order and enable delivery tracking.
When you want to add shipping details to an order, you can send the shipping details after creating the order, as explained in this API call. This call can be used for a better customer experience when shipping information is available before capturing the order.
By adding the shipping details on order level, you make this information available to your customers so that they can keep track of the delivery.
To add the shipping information to an order, send a POST
request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/shipping-info
endpoint.
Provide order_id
as path parameter. The order_id
is the identifier you get in a successful response when placing a new order.
Include the following required body parameters in your request:
return_shipping_company
: name of the shipping company for the return shipment return_tracking_number
: tracking number that identifies the return shipmentreturn_tracking_uri
: URL where the customer can track the return shipmentshipping_company
: logistics company (carrier) managing the delivery. For more information, see the carrier list.shipping_method
: method for delivering the goods tracking_number
: tracking number that identifies the shipmenttracking_uri
: URI where the customer can track their shipmentYou can add different shipping information for different items in the same call. For example, suppose a single order includes two packages associated with two different shipments and tracking numbers; in that case, you have to send the shipping_info
details for each item.
You can learn more about shipping companies in the Carrier partner section.
If your request is successful, you'll receive a 204 No content
response.
If your request contains errors, you'll receive an error response. Ensure the order_id
value you provided is valid and correctly formatted.
You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant Portal logs section.
Ready to send this request? See the API reference of this call.
Use the Order management API to cancel uncaptured orders.
When your customers don't want to proceed with the purchase and need to cancel their order before you capture it, send an API call to cancel the authorization.
When you cancel the order, we release the authorized amount and you can't make further updates to the order.
To successfully cancel the order, don’t capture any items listed in it.
The following diagram depicts how this API call works:
To cancel an authorized order, send a POST
request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/cancel
.
The order_id is the identifier you get in a successful response when placing a new order. You don't need a request body for this POST
method.
If the request is successful, the order is canceled, and you'll receive a 204 No content response.
If your request contains errors, you'll receive an error response. It can be because the order has captures or is closed.
Make sure the order_id
is correct. You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal Logs section.
Ready to send this request? See the API reference of this call.
Use the Order management API to acknowledge your Klarna checkout orders.
When you integrate our Klarna checkout solution, you’ll receive a push notification anytime your customers use Klarna in your store. Upon receiving this notification, you let us know that you're aware of the order by calling our order acknowledgment endpoint. This step is required if you're integrating Klarna checkout into your online business.
To verify that the notification you receive is authentic, we recommend checking the order details before taking further action.
To acknowledge an order, send a POST
request to the {apiUrl}/ordermanagement/v1/orders/{order_id}/acknowledge endpoint
.
The order_id
is the identifier you get in a successful response when placing a new order. You don't need a request body for this POST
method.
In case of same-day shipping, you can acknowledge your Klarna checkout orders by capturing them.
If the request is successful, you'll receive a 204 No content response.
If your request contains errors, you'll receive an error response. Make sure the order_id
is correct.
You can use the correlation_id
and the order_id
values to troubleshoot the call in the Merchant portal logs section.
Ready to send this request? See the API reference of this call.