Widget v2.0
Read on setting up widget
It is required to use widget v2.0 to provide the KYC information which are sensitive and cannot be updated via KYC API. You need to follow the steps mentioned below to initialize and setup the widget v2.0.
To initialize the widget, you will need to first generate a Widget Token, which will only be valid for a certain time period. You will need to pass this token along with the Sender ID to widget initialization snippets.
GET /v2/senders/{senderId}/widget-token
Field
Required
Type
Description
token
Response
String
Token Details
senderId
Yes
UUID
User ID
expiry_minutes
Response
Numeric
Token validity time
1. Include the Widget Script
2. Create a div where widget needs to be placed.
3. Initialize the Widget
elementId
Yes
String
Target element where widget will be rendered.
senderId
Yes
String
senderId
for whom the widget should be rendered.
width
Yes
Standard Size Dimension eg. 100px, 100%, 100em
Width of widget
height
Yes
Standard Size Dimension e.g. 100px, 100%, 100em
Height of widget
type
Yes
String
Type of Widget.
kyc
Widget v2.0 supports kyc
widget type only.
locale
No
String
By default, this is set to English, For Korean pass ko and for English pass en. If left blank or invalid locale is sent it will fall back to default language.
stylesheet
No
URL
This stylesheet will override the default design of the widget.
token
Yes
String
Unique Token that needs to be generated using Generate Widget Token API.
version
Yes
String
1.0 is the default value. To use version 2.0 please include the version number in the script.
fields
Yes
String
The kyc fields provided will be rendered by the widget. To render multiple fields, fields will be concatenated and delimited by a pipe '|' character.
4. Add an Event Handler
Widget will trigger an event anytime there is changes in a resource. To listen to the events generated by the widget include below code snippet.
KYC FIELD FOUR_DIGIT_SSN SUBMITTED
kyc
Four digit SSN has been submitted by the user.
KYC FIELD FULL_DIGIT_SSN SUBMITTED
kyc
Full SSN has been submitted by the user.
KYC FIELD ID_INFO SUBMITTED
kyc
ID details have been submitted by the user.
KYC FIELD PROOF_OF_ADDRESS SUBMITTED
kyc
Proof of address document has been submitted by the user.
KYC FIELD SOURCE_OF_FUND SUBMITTED
kyc
Source of fund details have been submitted by the user.
Last updated