Digital Signature Using Adobe Acrobat Sign Integration

In the digital age, where the pace of operations is fast and the need for security and compliance with legal regulations is constantly growing, digital signatures are becoming increasingly popular as an alternative to traditional handwritten signatures. Digital signatures enable quick, convenient, and secure signing of electronic documents, both in PDF format and other formats, through financial applications and dedicated e-signature platforms.

In the European Union, as well as in many countries outside the EU, digital signatures are legally recognized and have the same legal force as traditional handwritten signatures. Thanks to digital signatures, the process of signing documents becomes fast, easy, and convenient, without the need for printing, scanning, and traditionally sending documents.

Eliminating the need to use paper and mail significantly reduces the costs and time associated with traditional methods of signing documents.

How does the process of signing digital documents work?

The process of signing digital documents is simple and intuitive. The user receives an invitation to sign the document through a financial application or another signing platform. After verifying their identity, they can digitally sign the document directly in electronic form. The digital signature is added to the document in a way that ensures integrity and authenticity.

Integration with the Adobe Acrobat Sign platform

One of the services enabling the digital signing of documents is the Adobe Acrobat Sign platform, a highly sophisticated tool that, besides its main function, allows for advanced configuration of the document sent for signing (such as the number of signers, their order, or the place where signatures will be placed). This service can be used directly on the Adobe platform, but it can also be integrated with your own application through the Acrobat Sign API. We utilized this solution when creating an application for our client in Belgium.

This program is a web application designed to facilitate the establishment of a business for Belgian citizens - from assisting in choosing the legal form based on projected income calculations and taxation to formally finalizing the business registration process. Given the tasks performed by the application, it was necessary to implement a document signing tool, and we chose to integrate with Adobe Sign, which has extensive official documentation as well as a large base of third-party materials explaining how to use the platform or apply the API.

Adobe also provides logged-in users with the Swagger tool documenting the Acrobat Sign API and allowing for sending test requests: [Adobe Sign API documentation](https://secure.eu2.adobesign.com/public/docs/restapi/v6).

As mentioned earlier, Acrobat Sign is a highly sophisticated service. It allows, among other things, for the expansion of your own software with a signature module based on a partnership with Adobe. However, the assumptions provided by our client did not foresee such a solution, and documents generated in the admin panel are sent to the user's email. It is also worth mentioning that there are several types of electronic signatures - from basic signatures to qualified signatures, which have the legal effect of a traditional signature.

In the process of creating functionality and during testing, it is simpler to set a basic signature (an example later in the document), but it should be remembered that this signature is not as secure as a qualified signature, which verifies the identity of the signer. In the Belgian and Dutch markets, the itsme identity provider is very popular. Later, I will show how to configure a document and an Adobe account to use itsme verification.

Starting from the necessary documents to have anything to sign, in our application, there are two types of documents - uploaded by the administrator and generated automatically. Here, we also use a solution from Adobe called Document Generation API. With this tool, we can prepare a template with placeholders in a text editor, which will be dynamically replaced with user data during generation. The tool has very good documentation with sample Java code (but there is also documentation for .Net and Node.js): [Document Generation API documentation](Documentation API dokumentacji generowania dokumentów).https://developer.adobe.com/document-services/docs/overview/document-generation-api/quickstarts/java...

Since we already have a document ready for signing, we can proceed to the Acrobat Sign API. First, we create a temporary document to which an identifier needed for subsequent operations on the document will be assigned by sending a request to POST /transientDocuments endpoint. Along with this request, the document file for signing is sent (requests are authorized through an OAuth access token or an API key).

Once we have received the ID for our temporarily associated document, we can proceed with sending it. In the request body, besides the ID received earlier, we need to send information about the type of signature and the recipient or recipients of the document. Among the information about the document recipients is an attribute called "role," specifying the role the person is to perform - the API offers a wide range of choices in this matter, but in our case, "SIGNER" will be appropriate. Another important field to fill in is the state field, which can take values DRAFT, AUTHORING, or IN_PROCESS. The first one specifies the state in which the document is in draft form and can still be expanded through requests to the API. The second one - AUTHORING - accepts a document that is already in final form, but we can still set form fields for it, such as configuring signature fields for individual recipients (their position, size, or type of field - as discussed later). The last one, IN_PROCESS, sends the document immediately without waiting for further configuration. In our case, we will use AUTHORING because we will still be setting signature fields.

If we want the document to be signed by two signers, the JSON representing the request body for sending the document for signature (POST /agreements) will look like this:

{
  "fileInfos": [
    {
      "transientDocumentId": "***************************"
    }
  ],
  "name": "TestDocument",
  "participantSetsInfo": [
    {
      "memberInfos": [
        {
          "email": "first.user@example.com"
        }
      ],
      "order": 1,
      "role": "SIGNER"
    },
    {
        "memberInfos": [
            {
                "email": "second.user@example.com"
            }
        ],
        "order": 2,
        "role": "SIGNER"
    }
  ],
  "signatureType": "ESIGN",
  "state": "AUTHORING"
}


In response, we will receive an agreement ID, which we will use to further manage the document. First, we will use it to set form fields in the document using PUT /agreements/{agreementId}/formFields.


{
  "fields": [
    {
      "locations": [
        {
          "height": 50,
          "left": 75,
          "pageNumber": 1,
          "top": 200,
          "width": 150
        }
      ],
      "name": "Sign here First",
      "assignee": "{participantId}",
      "inputType": "SIGNATURE",
      "contentType": "SIGNATURE",
      "required": true,
      "visible": true
    },
    {
      "locations": [
        {
          "height": 50,
          "left": 175,
          "pageNumber": 1,
          "top": 200,
          "width": 150
        }
      ],
      "name": "Sign here Second",
      "assignee": "{participantId}",
      "inputType": "SIGNATURE",
      "contentType": "SIGNATURE",
      "required": true,
      "visible": true
    }
  ]
}


We can see that signature fields are assigned to signers in this case. We can obtain the identifiers of these users with GET /agreements/{agreementId}/members. Once we have the updated document with information about "formFields", this document is sent for signature – first to the initial recipient, and when the signature is provided, Adobe forwards the document to the next signer.

Verification using an identity provider


Notice that the above example concerns a basic electronic signature - the user can sign the document on the computer screen with a mouse or keyboard, or on a tablet screen with a finger. Such a signature can be used for matters that do not require a high degree of identity verification. But what if we want a complex signature to have the legal force of a handwritten signature? We need to use a qualified signature, which means that the signer's identity must be verified in a reliable and unquestionable manner by an entity guaranteeing this state of affairs and possessing a certificate confirming this. Such an entity is an identity provider. In Belgium and the Netherlands, the popular service for identity verification in their respective markets is itsme. To use it, we first need to configure our Adobe Sign account accordingly. These settings can be found in the Accounts tab, under Digital Signatures. We need to uncheck "Download and Sign with Acrobat." In the "Allowed Cloud Signature Providers" section, we should leave only the provider whose services we want to use, which in our case is itsme. Below, we also uncheck the option "Use different digital signature for external signers." At the bottom, there is the identifier of our account, which must be shared with the identity provider.



Once we have the ability to place this type of signature in the document sent for signature, and we want to use it, we simply need to replace the value in the "inputType" attribute with "PDF_SIGNATURE" and in the "contentType" attribute with "DIGITAL_SIGNATURE" in the previously discussed request PUT /agreements/{agreementId}/formFields. When the user receives a document with fields defined in this way and wants to sign it, they will be redirected to the itsme service, which will verify their identity, and the document will be signed with a qualified electronic signature, having the legal effect of a traditional handwritten signature.

In summary, digital signatures provide a modern solution for secure and convenient electronic document signing. With them, companies and financial institutions can achieve greater efficiency, security, and compliance with legal regulations. In the digital age, digital signatures are an essential tool for anyone looking to pursue their business goals in an innovative and secure manner.