Klarna checkout V3 plugin send extra options for specific country

Hello!

We want to send extra params to Klarna checkout V3 using the Litium plugin.

Specifically, we want to add in the options array so phone number becomes mandatory for Germany.

Can we use the Litiums Klarna V3 plugin config file for this? Or is there any other way of sending more info to Klara?

Thanks

You can update the data sent to Klarna, using the UpdateDataSentToKlarna method in KlarnaPaymentWidgetConfigV3: https://docs.litium.com/documentation/add-ons/payments/klarna/develop#modifydata

Unfortunately, the underlying dotnet API from Klarna doesn’t seem to include the phone mandatory option. You could try creating a new class that inherits the CheckoutOptions class and add your property. Something like:

public class CustomCheckoutOptions : CheckoutOptions
{
    [JsonProperty(PropertyName = "phone_mandatory")]
    public bool PhoneMandatory { get; set; }
}

And then use that class in the method above instead.

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