Skip to content

Migration to v2.x

This guide helps you migrate your Platform SDK integration from version 1.x to version 2.x.

Important

Platform SDK v1 has reached end-of-support (EOS) and will no longer receive updates, including security patches and bug fixes. All customers are strongly advised to upgrade to v2.x. For details, see Changelog.

What's new

Version 2 introduces several improvements to the SDK architecture and configuration.

Breaking changes:

  • The serverPath parameter becomes mandatory for all SDK modules.
  • Fraud Prevention is disabled by default and must be explicitly initialized.
  • Deprecating Fraud Prevention functions: unidentifiedUser(), identifyUser() and setUser().
  • Webauthn methods were refactored to use a single parameter object pattern instead of multiple positional parameters.

Changes:

  • The Orchestration (IDO) module now uses separate typing files.

Migrate your app to SDK v2.x

Step 1: Add serverPath to all modules

The serverPath parameter is now mandatory for all SDK modules. Review all initialize() calls and add serverPath for each module you use.

Before (v1):

await initialize({
  clientId: 'your-client-id',
  ido: {
    // serverPath was optional, defaulted to US region
  }
});

After (v2.x):

await initialize({
  clientId: 'your-client-id',
  ido: {
    serverPath: 'https://api.transmitsecurity.io/ido' // Required
  }
});

Use the appropriate serverPath for your environment:

EnvironmentserverPath
UShttps://api.transmitsecurity.io/ido
EUhttps://api.eu.transmitsecurity.io/ido
Canadahttps://api.ca.transmitsecurity.io/ido
Australiahttps://api.au.transmitsecurity.io/ido
Sandboxhttps://api.sbx.transmitsecurity.io/ido
Custom domainhttps://<your_custom_domain>/ido

Step 2: Initialize Fraud Prevention explicitly

In v2.x, Fraud Prevention is disabled by default and must be explicitly initialized if your application relies on it. Add the drs module configuration to your initialize() call:

Before (v1):

await initialize({
  clientId: 'your-client-id',
  // Fraud Prevention was initialized automatically
});

After (v2.x):

await initialize({
  clientId: 'your-client-id',
  drs: {
    serverPath: 'https://api.transmitsecurity.io/risk-collect/' // Explicit initialization required
  }
});

Step 3: Update renamed Fraud Prevention functions

If your application uses any of the following Fraud Prevention functions, update them to the new names:

v1 functionv2.x function
unidentifiedUser()clearUser()
identifyUser()setAuthenticatedUser()
setUser()setAuthenticatedUser()

See Fraud Prevention SDK reference for details.

Step 4: Update WebAuthn method signatures

WebAuthn methods have been refactored to use a single parameter object instead of multiple positional parameters:

Before (v1):

webauthn.register('user@email.com', { displayName: 'Display Name' });

After (v2.x):

webauthn.register({ username: 'user@email.com', options: { displayName: 'Display Name' } });

See WebAuthn SDK reference for the updated method signatures.

Step 5: Update Orchestration type imports

The Orchestration (IDO) module now uses separate typing files. If your TypeScript application imports IDO types, update the import paths:

Before (v1):

import { IdoServiceResponse, ClientResponseOptionType } from '@transmitsecurity/platform-web-sdk';

After (v2.x):

import type { IdoServiceResponse, ClientResponseOptionType } from '@transmitsecurity/platform-web-sdk/ido';

Step 6: Update SDK version

Update the SDK package or CDN script to version 2:

Note

The latest will remain frozen on the last v1 release. To receive ongoing v2.x updates, explicitly install a v2.x version.

  • NPM: Update to @transmitsecurity/platform-web-sdk@^2
  • CDN: Change script URL from 1.x to 2.x

Step 7: Test your integration

  • Verify all SDK functionality works as expected
  • Check browser console for any initialization errors