Installing the Web SDK

To install the Web SDK, complete the following steps:

  1. Embed the Web SDK JavaScript file to your page by adding the following code to your website's payment page.
<script type="text/javascript" src="https://libs.fraud.elavon.com/sdk-web-js/0.13.9/3ds2-web-sdk.min.js"></script>
  1. Access the Web SDK functionality from the window object.
`window.Elavon3DSWebSDK`
  1. Make a call to your server to get an authentication token that you will need to use with the Web SDK. Note that the Web SDK only supports JWT tokens for authentication. For steps to get a token, see Authentication .

Use the following code to set up your credentials in the Web SDK.

var sdk = new window.Elavon3DSWebSDK(
{
    baseUrl: "https://uat.gw.fraud.eu.elavonaws.com/3ds2",  // Required. URL of Elavon’s 3DS Server.

    token: "JWT TOKEN"  // Generated by using the API key to send a request for a JWT token from the 3DS Server.
  });
  1. Create a new instance of the object and assign it to your preferred variable.
const sdk = new window.Elavon3DSWebSDK([options])

Example:

(`const sdk = new window.Elavon3DSWebSDK({baseUrl: 'https://baseUrl', token: 'authentication token from step 3'})`)