Custom shipping options in Klarna for Litium 8

How can I use custom shipping options in Klarna for Litium 8?

In Litium 7 it was possible with KlarnaPaymentConfigV3 => UpdateDataSentToKlarna => klarnaCheckoutOrder.ShippingOptions.

Is it possible to replicate that in Litium 8?
The goal is to get this behaviour, and be able to toggle different alternatives depending on weight:

Litium version: 8.8

I was able to figure it out. It was in the documentation :man_facepalming:
image

But a follow up question.

Can I code some rules around this?
For example:
If the weight of products is under 2kg, use Delivery 1
Else use Delivery 2

Unfortunately the app goes around you back an ask litium directly for the methods connected to that channel. I can’t find where but i think @patric.forsgard hade a idea somewhere about perhaps it was possible to decorate the service that the klarna app talks to but haven’t tested since we just needed to stop litium from sending them at app to klarna and that was added to litium in the latest versions.

1 Like

Thanks Jonas! Hopefully Patric has some nice way of decorating it.

It exists an interface that can be implemented that is invoking with the payment information that is sent to the payment app before the request happen, you find it in the Litium.Connect.Abstractions package and the name is Litium.Connect.Payments.IPaymentIntrospection, the interface is marked as experimental because the contract may change if we see that we need more parameters in the request.

1 Like

Thanks Patric! I was able to remove one of the options and place the order. So it looks promising.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.