CertSign Integration for electronic signature

Certsign is a digital certification for digital signatures. It will provide the user with the capability to use the Esign processor in the Studio and Portal. This makes possible to sign contracts and other documents by a client. The existing integration provides two types of signature:

  • Remote signature (with authorization code sent through sms)
  • Automatic signature (with an existing certificate)
  • Automatic signature with qualified electronic sign.

After the installation of the ESign provider package, you should add the following configuration in FTOS Portal web.config, section appSettings or JobServer serviceSettings.config:

Copy
<add key="FTOSServicesESignProvider2Endpoint" value="https://aztestapi01.azure-api.net/certSign"/> <!-- This is the test env url -->
<add key="FTOSServicesESignProvider2AppId" value=""/><!-- the subscription key -->
<add key="ESignProvider2CertName" value="certSignTest"/> <!-- the mapping for the certificate provided by FTOS-->

If you have to configure also, the automatic signature, please add the following keys:

Copy
<add key="ESign2AutomaticNumber_{ProfileName}" value=""/> <!--this will contain the serial number provided for the specific profile-->
<add key="ESign2AutomaticName_{ProfileName}" value="cn=certSIGN CA Class 2 G2,ou=certSIGN CA Class 2 G2,o=certSIGN,c=RO"/> <!--this will contain the issuer information for the profile-->
IMPORTANT!  
The token {ProfileName} must be replaced with a profile name that will be used when requesting the signature process.

Set up for the automatic signature with qualified electronic sign

After the installation of the ESign provider package, you should add the following configuration in JobServer serviceSettings.config:

Copy
<add key="FTOSServicesESignProvider2Endpoint" value="https://aztestapi01.azure-api.net/certSign"/> <!-- This is the test env url -->
    <add key="FTOSServicesESignProvider2AppId" value=""/><!-- the subscription key -->
    <add key="ESignProvider2AutomaticQESCertName" value="certSignTestAutomatic"/> <!-- the mapping for the certificate provided by FTOS for the Automatic QES signature-->

Insert a record in the business entity FTOS_DDM_ESignQueue, this record will contain the configurations that will be used for automatic qualified electronic sign.

ProfileName, choose a name for this automatic profile, make sure it is unique if you have multiple configurations:

  • ExternalId, this value should be provided CertSign, it will be the externalId of the user that is enrolled to sign with automatic QES
  • Seed, this value will be read by the agent from his CertSign acount (he will receive an email with steps to follow)
  • WorkstepsBulkNo, this represents the number of worksteps that will be sent in the request to be signed with automatic QES.

Calling the automatic signature with qualified electronic sign

The request for automatic QES will be sent together with the rest of the worksteps. The signing processes will be made in the order provided in the request. It is recommended that this signature to stay at the end because it will be processed async by Job Server.

The workstep with automatic QES should be like:

Copy
{
      "signatureTag": "#tagAgentQES#",
      "signatureType": FTOSServices.DDM.signatureType.AutomaticQES,
      "automaticProfile": "ProfileNameDefinedInQueue", //defined in FTOS_DDM_ESignQueue
      "signatureStamp": { //this is for the signature stamp 
        "SignerName":"Sign name",
        "Reason": "Credit loan", //this will appear in signature details
        "Subject": "Bank signature",
        "ShowTimeStamp": true, //show date in signature stamp
        "FontSize": "12"
      }
    }

 

 

NOTE  
The automatic QES signing has to be processed by Job Server, so you must configure a schedule trigger with a server side script. Please make sure that you won't use the same ExternalId on multiple instances of FintechOS. Also, the scheduled trigger should be configured to run with a frequency of at least 30 seconds. The recommended cron expression should be to start at second 0 or at second 30 and to run from 30s in 30s (or a multiple of 30s = 1min, 2min, etc).

In the server side script you have to call the following method with the parameter ProfileName that you've defined in FTOS_DDM_ESignQueue:

Copy
//This method returns the list with processed eSignId and the workstepId that has been finished
//As input you shoul pass the Name that you've configured in  FTOS_DDM_ESignQueue
var result = FTOSServices.DDM.ESign2.processPendingAutomaticQESSign("ProfileNameDefinedInQueue");


// if success the result will look like:
/*
{
  "isSuccess": true,
  "isFinished": true,
  "eSignProcesses": [
    {
      "eSignId": "e2f2bc20-de1f-41f1-851b-5c0279cc4cb7",
      "eSignWorkstepId": "13b2ea4e-f5cb-491a-a32a-268741e7da2a"
    },
    {
      "eSignId": "ac42d532-88a3-4db6-932c-9d0888e2fd0e",
      "eSignWorkstepId": "6830d22a-9309-4a11-9e9a-05ab7ac8807b"
    }
  ]
}
*/

FTOS ESign Services API

In order to sign a document you must call the following methods:

  1. RequestSign (for the configuration of the automatic signature)

    For client signature with remote method with authorization code sent through sms:

  2. AcceptTermsAndConditions
  3. Authorize signature
  4. Resend code

RequestSign

Firstly, add a reference to the library FTOSServices. To request with qualified electronic signature and automatic, use the following example:

Copy
var signRequest = {
    "workstepConfigs": [{
        "signatureTag": "#tagClient#",
        "signatureType": FTOSServices.DDM.signatureType.QualifiedElectronicSign,
        "recipient": {
            "Country": "RO",
            "Email": "@fintechos.com",
            "ExternalId": "", //an unique id representing the customer (ex: Accoountid)
            "FirstName": "M",
            "LastName": "C",
            "PhoneMobile": "+407",
            "SocialSecurityNumber": "", //PIN
            "IdPhoto": "", // ftos file attribute value representing the id picture
        },
        "signatureStamp": {
            "Reason": "Client reason",
            "Subject": "Credit loan",
            "SignerName": "TestFirstName TestLastName"
        }
    }, {
        "signatureTag": "#tagBank#",
        "signatureType": FTOSServices.DDM.signatureType.AutomaticSign,
        "automaticProfile": "Profile1",
        "signatureStamp": { //this is for the signature stamp
            "Reason": "Credit loan", //this will appear in signature details
            "Subject": "Bank signature",
            "ShowTimeStamp": true //show date in signature stamp
        }
    }],
    "signedDocumentName": "test.pdf",
    "files": [{
        "ftosFile": "" //ftos file attribute value representing the pdf that needs to be signed
    }]
}
Optionally, you can add to the recipient property the following information.It will appear in terms and conditions file......
"workstepConfigs": [{
        "signatureTag": "#tagClient#",
        "signatureType": FTOSServices.DDM.signatureType.QualifiedElectronicSign,
        "recipient": {......
            "DocumentIssuedBy": "splcid", "DocumentIssuedOn": "2020-01-20", "DocumentExpiryDate": "2050-01-25", "DocumentNumber": "123456", "DocumentSeries": "xa", "County": "Braila", "City": "Braila", "Street": "asd", "StreetNo": "12", "Block": "asd", "Entrance": "q", "ApartmentNo": "123", "ZipCode": "123453",
        }
HINT  
If you have a request with multiple signatures, please keep in mind that the signing processes is sequentially and the client signature must have manual input (accept terms and conditions and authorize signing using the code received via sms).

You should save the eSignId in order to track the status of the eSign process using the method GetESignStatus.

Async methods, can be used with JobServer: