Synaps
Search…
Web
In this section, we will see how to integrate your Verify with Synaps button easily.
If you need any assistance, don't hesitate to contact technical support at [email protected]

1. Integrate Synaps Web SDK

Embed the Synaps Javascript SDK to your web app
using script tag
1
<script src="https://sdk.synaps.io/3.0.5/verify.js"></script>
Copied!
using npm
1
npm install @synaps-io/verify.js
Copied!

2. Add Synaps element

There is two integration methods : modal or embed
modal : place a button and open the verification flow when user click on the button
embed : integrate directly the verification flow into your interface
Add the following element to your page to add the button.
1
<button id="synaps-btn">Verify with Synaps</button>
Copied!
Note that you can also use it as a link
1
<a id="synaps-btn">Verify with Synaps</a>
Copied!
Make sure that the element have synaps-btn as id attribute

Embed integration

Add the following element to add the verification flow to your page
1
<div id="synaps-embed"></div>
Copied!
Make sure that the element have synaps-embed as id attribute

3. Init SDK

To init the Synaps SDK, simply write down the following line in your JS.
session_service must be replaced either by individual or corporate
  • individual - for know your customer
  • corporate - for know your business
1
const Synaps = new SynapsClient('session_id', 'session_service');
2
Synaps.init();
Copied!

Get a session_id

To get a session_id you need to create an app on Synaps Manager. Once you selected your service type, you will have to go in your "integration" tab and copy your Api-Key.
The Api-Key MUST NOT be stored in your frontend. You have to store it on your server and never on the client side. The only thing that should be exposed to the user is the session_id.
To create a session_id, you have to call the API related to the service you chose. For instance, if you chose Identity service, go to Identity > Sessions in the documentation.

Know Your Customer - Session Creation

Know Your Business - Session Creation

Once you initliazed your session_id, you will have to init the SDK with your session_id and a session_service.
session_service must be replaced either by workflow or corporate
  • workflow - for know your customer
  • corporate - for know your business
By default, the SDK type is set to modal which means that need to implement the Verify with Synaps button to your page to make it work. However, you can set the type to embed, simply by passing it as an option while you declare the SynapsClient.
1
const Synaps = new SynapsClient('session_id', 'session_service');
2
Synaps.init({
3
type: "embed",
4
})
Copied!

4. Events

Synaps Web SDK (javascript) lets you know when the user has finished the workflow.

Flow finished

On completed onboarding, Synaps will trigger a callback.
1
Synaps.on('finish', () => {
2
// Do something
3
});
Copied!

5. Customization

Custom colors

We give you the possibility to customize your workflow with your colors. You can set a primary color and a secondary color, it will create a verification flow tailored to your compliance needs and your brand.
To add primary and secondary colors, simply add colors with primary and secondary inside without the hashtag '#'.
1
const Synaps = new SynapsClient('session_id', 'session_service');
2
Synaps.init({
3
type: "embed",
4
colors: {
5
primary: "212b39",
6
secondary: "ffffff",
7
}
8
})
Copied!

Custom Element ID

If for some reason you need to bind our workflow on other element ID, you can.
Simply add, element_id as an option and it will automatically bind it.
1
const Synaps = new SynapsClient('session_id', 'session_service');
2
Synaps.init({
3
type: "modal",
4
element_id: "synaps-identity-btn"
5
})
Copied!
With the code above, you will be able to execute the following easily. It will see synaps-identity-btn as the element to bind and once you will click on the button, it will shows the modal.
1
<button class="synaps-verify-btn-blue" id="synaps-identity-btn">
2
Verify with Synaps
3
</button>
Copied!

Custom language

You can set a predefined language for your user. Synaps already take advantage of browser language to display the relevant language to the end-user but if your user has set up a language option to your website, you can definitely pass it as an option.
1
Synaps.init({
2
lang: "fr" // fr, en,
3
})
Copied!

Custom tiers

As explained before in the documentation, tiers is a simply way to divide your workflow into small pieces. It is very useful when you offer different features based on the verification level of your customer.
Tier System on WeStart
To create your own tier, check out the step-by-step guide
Once created, you will have your tier_id , You will have to pass it in the options objects while initialising the SDK.
1
Synaps.init({
2
type: "modal",
3
tier: "2349823482"
4
})
Copied!
Last modified 3mo ago