Embedded Flow
Flow Overview
Steps
Create Case
The initial step is to create a case, which represents an individual who will go through the workflow.
During case creation, you can provide additional data such as first name, last name, number, or company name. These details can be utilized when executing tasks in the workflow. This step must be carried out on your backend server.
Create a case with provided data
First name
Last name
Personal Number
Comapny name
Company number
Company address
POST /cases HTTP/1.1
Host: api.transactionlink.io
Content-Type: application/json
Accept: */*
Content-Length: 646
{
"firstName": "Jan",
"lastName": "Nowak",
"personalNumber": 17300211234,
"email": "[email protected]",
"phone": {
"countryCode": 48,
"number": 666666666
},
"companyName": "Company name",
"companyNumber": "Company number",
"companyAddress": "Company address",
"documents": [
{
"resourceId": "20fd5007-008d-447c-8378-6f81ea48fe65",
"resourceName": "File name.pdf",
"resourcePath": "resources/e1413f5b-acb0-4995-919a-3fc60c9592c5/20fd5007-008d-447c-8378-6f81ea48fe65/File name.pdf"
},
{
"resourceId": "20fd5007-008d-447c-8378-6f81ea48fe65",
"resourceName": "File name.pdf",
"resourcePath": "resources/e1413f5b-acb0-4995-919a-3fc60c9592c5/20fd5007-008d-447c-8378-6f81ea48fe65/File name.pdf"
}
]
}
{
"createdDate": "text",
"caseId": "text",
"partyId": "text",
"partyDetails": {
"personal": {
"firstName": "text",
"lastName": "text",
"personalNumber": "text",
"email": "text",
"phone": {
"countryCode": "text",
"number": "text"
}
},
"business": {
"companyNumber": "text",
"companyName": "text",
"companyAddress": "text"
},
"documents": [
{
"resourceId": "text",
"resourceName": "text",
"resourcePath": "text"
}
]
}
}
Generate Token
A Token is generated to initiate the widget with the onboarding workflow for the individual represented by a Case. To generate the Token, both a case and a workflow definition are necessary. This step must be carried out on your backend server.
Widget token for provided caseId
and workflowDefinitionId
with optional parametersId
Case identifier for which we want to initiate the workflow
Id of the workflow definition
3b2d8a4f-579f-4e2e-a51c-f859e532fe8c
Id of the parameters used in workflow
4b6ffcb6-ab6d-44b9-b5ab-4b5147b0b302
POST /token HTTP/1.1
Host: api.transactionlink.io
Content-Type: application/json
Accept: */*
Content-Length: 165
{
"caseId": "123e4567-e89b-12d3-a456-426614174000",
"workflowDefinitionId": "3b2d8a4f-579f-4e2e-a51c-f859e532fe8c",
"parametersId": "4b6ffcb6-ab6d-44b9-b5ab-4b5147b0b302"
}
{
"token": "ewogICJhbGciIDogIlJTNTEyIgp9.ewogICJjdXN0b21lcklkIiA6ICIxMTUzNmU2NS00YmIwLTQ3ZGQtOTYwMC03NmFjNTM1Yzc4MzIiLAogICJwYXJ0eUlkIiA6ICIzYjJkOGE0Zi01NzlmLTRlMmUtYTUxYy1mODU5ZTUzMmZlOGMiLAogICJ3b3Jrc3BhY2VJZCIgOiAiMWY5ZDI4YmItNzQ5NC00NTMxLWI1MGUtZmM1YTlhMTFiNDgzIiwKICAiaWF0IiA6IDE2NDUwMjkyOTcsCiAgImV4cCIgOiAxNjQ1MDMyODk3Cn0.j62_fClRsh6vk4Lx2JoMSoEjptUyK9kqtaK_9BtYk3j-Gw-dphMRD4TL0tSc-CBHloV8wl2knMqsyTHLMNSdOkwZYNeSfPwABQEmgNkpOJoyKAxlYAp3KOpkhT4EQgYFeewrK6tgOiLPWy5tlT8NOMJHWJ_VdDGjtBd1jcir1Tp6ipumoUcBfrspHIuXbNVdh7PHJg1mUVHMspvL1WsARVvqHe9KsUszVPdlxc2xJkKFf2jwh70jwjcaXSkBSu4iOVjPdblC6vdvZpRIUK7eSASKexPfQaJXMa0iDv7NEwSAQbrz9iyXiYD5pnRR6MeGAX1d39Z09sxvVzyon_aSvA",
"expiryDuration": 3600,
"tokenType": "Bearer"
}
Set Token in the Widget
To import our Widget, you need to include it in your target page as follows. Use the transactionlink-widget tag to place the widget on your website.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<transactionlink-widget />
<script>
window.transactionlink_ready = () => {
transactionlink.setOptions({
token: 'exampleToken', // string
...otherOptions
});
transactionlink.open();
}
</script>
<script src="https://widget.sandbox.transactionlink.io/transactionlink-widget.umd.js"></script>
</body>
</html>
Last updated
Was this helpful?