.. _3ds_method: 3DS Method invocation ===================== .. note:: Only used for browser authentication The 3DS Method can be optionally used by issuers to gather browser fingerprints using JavaScript. This is done by loading a URL in a hidden iframe, before the authentication. This iframe will then execute some fingerprinting JavaScript, before POST'ing to the prespecified URL belonging to the requestor. The 3DS Method fingerprint result is tied to the authentication by the ``threeDSServerTransID``. If `3DS Method URL`_ is included in the :ref:`preauth-usage` response, the 3DS method *must* be invoked as explained in this guide. If ``threeDSMethodURL`` *is not* included in the ``/preauth`` response (ref. :ref:`2.1.0 `, :ref:`2.1.0 `), continue with the :ref:`auth-usage` and set `3DS Completion indicator `_ to ``"U"``, to indicate that the 3DS Method was not available. Initiating 3DS Method --------------------- Create a JSON object containing ``threeDSServerTransID`` from the :ref:`preauth ` call and the callback URL you wish to receive the POST to in ``threeDSMethodNotificationURL``: .. code-block:: json { "threeDSServerTransID": "d461f105-1792-407f-95ff-9a496fd918a9", "threeDSMethodNotificationURL": "" } The procedure is as follows: #. Render a hidden HTML iframe in the Cardholder browser #. Create a form with an input field named ``threeDSMethodData`` #. This field must contain the above JSON message, Base64-URL encoded #. Post the form to the ``threeDSMethodURL``, with the HTML iframe as a target Example ******* Add an iframe to the users browser, here using JavaScript .. code-block:: javascript let displayBox = document.getElementById('displayBox'); let iframe = document.createElement('iframe'); iframe.classList.add('hidden'); iframe.name = "threeDSMethodIframe"; displayBox.appendChild(iframe); Resulting in the following html .. code-block:: html