In Klarna V2 there is an option to add an additional checkbox like this:
new CheckoutOptions
{
AdditionalCheckBoxText = “Newsletter”,
AdditionalCheckBoxChecked = true,
}
Is this avalible in Klarna V3? In that case how would i do that?
You could extend the CheckoutOptions object to include the specific properties for this checkbox. You’d need to create the checkout box as a separate class and add JsonProperty decorations for the new properties.
Here’s the example JSON from Klarna (shortened for brevity):
"options": {
...
"additional_checkbox": {
"text": "Please add me to the newsletter list, read more here link",
"checked": false,
"required": false
},
"national_identification_number_mandatory": false,
"additional_merchant_terms": "string",
"radius_border": "5",
"allowed_customer_types": "[\"person\", \"organization\"]",
"show_subtotal_detail": false,
"additional_checkboxes": [
{
"id": "newsletter_opt_in",
"text": "Please add me to the newsletter list, read more here link",
"checked": false,
"required": false
}
],
"require_validate_callback_success": false,
"vat_removed": false
},