Skip to main content

3DS Web SDK
Enterprise

3D Secure is an Enterprise feature. Contact support@basistheory.com to request access.

The Basis Theory 3DS Web SDK makes it easy to start a 3DS transaction from the browser.

Get started with our guide or continue reading the reference docs.

Before You Begin

This SDK requires the use of an API Key associated with a Public Application.

To create one, login into our Portal and create a new "Public" Application with the 3ds:session:create permission.

Installation

npm install --save @basis-theory/3ds-web

Initialization

import { BasisTheory3ds } from "@basis-theory/3ds-web";

const bt3ds = BasisTheory3ds("<API_KEY>");

Initialization Parameters

ParameterRequiredTypeDescription
apiKeytruestringThe API Key used to identify the Application
optionsfalseobjectOptions for customizing the SDK usage

Initialization Options

Usage

import { BasisTheory3ds } from "@basis-theory/3ds-web";

const bt3ds = BasisTheory3ds("<API_KEY>", {
apiBaseUrl: 'https://some-custom-url',
challengeContainerOptions: {
id: 'myCustomContainer',
},
});

Attributes

AttributeRequiredTypeDescription
apiBaseUrlfalsestringThe base URL for the Basis Theory API, if using a mock API
challengeContainerOptionsfalseobjectCustomizations applied to the challenge container

Challenge Container Options

AttributeRequiredTypeDescription
idfalsestringThe id for the HTML container which will hold the challenge window. Set as challengeFrameContainer by default