Introducing the link-Form Element

What changes and why?

We are introducing a new form element called link to the XS2A Form API.

The link form element represents a link to an URI and can be treated like a regular html-anchor form element.

The change was needed as we decided that a dedicated form element was required that can represent an html-anchor and the functionality of opening it. In contrast to the previous solution where a html-anchor was put into the text the new solution is more flexible as a link form element can contain tags that, if used, improve the User Experience. Most prominent example for now is the support for rendering as a button instead of a hyperlink. The text form element was neither suitable for such tags nor having a functionality apart from displaying text (e.g. handling clicks and opening URIs).

With the introduction of the link form element with the defined behaviour of opening the href on click we are able to provide an element for this precise task.

When will the change go live?

The change will affect sessions in the US immediately but will be introduced for all other countries on 2022-05-01. Sessions in the playground environment are also affected immediately for testing purposes.

What do you have to do now?

Klarna Branded Integrations

The Klarna Branded Integration is immediately capable of handling the link form element and therefore no change is needed.

White Label Integrations

  1. Add support for the display of the link form element which is documented here:

    See the documentation about the link form element

  1. (optional) Add support for the BUTTON-tag with links

    link with BUTTON tag

    Example of a possible look of a link form element with the BUTTON tag.

    See the list of possible tag-values for the link form element

  2. (optional) Add support for Context with HORIZONTAL Tag with Links and Text content

{
  "form_identifier": "aca9cb5f-fdba-4a9e-ab1d-18beb03cf456",
  "elements": [
    {
      "content": [
        {
          "content": "Check out the",
          "type": "text",
          "version": "1.0.0",
          "tags": []
        },
        {
          "type": "link",
          "tags": [],
          "version": "1.0.0",
          "href": "https://docs.openbanking.klarna.com/xs2a/xs2a-form/link.html",
          "text": "link element documentation"
        },
        {
          "content": "we released.",
          "type": "text",
          "version": "1.0.0",
          "tags": []
        }
      ],
      "tags": [
        "HORIZONTAL"
      ],
      "type": "context",
      "version": "1.0.0"
    }
  ],
  "version": "1.0.0"
}

The link should be displayed inline with the rest of the text. The example is displayed below.

HORIZONTAL Context with Text, Link, Text combination

The link form element can be tested in flow through the PSD2 Demobank and the keywords:

  • link
  • link-as-button
  • link-horizontal

results matching ""

    No results matching ""