You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.
You are right, the CheckoutOrder has no such field and actually it should not by two reasons:
The Klarna Checkout service differs from the Klarna Order Management service. You can consider them as two separated services, so they can have a different Order models
The most important part is, the field itself:
klarna_reference A Klarna generated reference that is shorter than the Klarna Order Id and is used as a customer friendly reference. It is most often used as a reference when Klarna is communicating with the customer with regard to payment statuses.
So this is a "friendly representation" of the created order. Since the checkout processes an order and it is not placed yet by customer, you cannot have such field (you can consider the order like "does not exist yet") and that's why the CheckoutOrder model has no such field. But after the order is placed - this reference will be generated and then you can use it.
Klarna Checkout says, that after placing an order use the Order Management to get the details. So using the Order Management you can finally get the klarna_reference.
By the way, thanks for pointing us to the models, we actualized them by adding missing fields (not related to the klarna_reference but still important).
CheckoutOrder does not map "klarna_response"
https://github.com/klarna/kco_rest_dotnet/blob/v3.x/Klarna.Rest/Klarna.Rest.Core/Model/CheckoutOrder.cs
https://developers.klarna.com/api/#order-management-api-get-order
The text was updated successfully, but these errors were encountered: