In OneSpan Sign, signers will only be asked to draw their signature once by default. If the transaction requires multiple signatures on the document, OneSpan Sign will automatically replicate the first drawn signature for any subsequent signatures. However, you have the option to require your signer to draw their signature on any given capture signature. This guide will focus on enforcing signature capture at the signature level. If you are looking to enforce this at the transaction level, which would take care of forcing all capture signatures be redrawn, refer to the Signing Ceremony Customization guide.

The Code

"Enforce Signature Capture" feature was introduced in version 11.18. Please make sure your SDK version is later than this. To enable this feature, simply add the .enableEnforceCaptureSignature() option to your signature builder, as seen below:
Signature enforceCaptureSignature = SignatureBuilder.captureFor("[email protected]")
	    .onPage(0)
	    .atPosition(100, 200)
	    .enableEnforceCaptureSignature()
	    .build();
Though applying the feature is simple, there are a couple additional considerations to keep in mind: (1) "enforceCaptureSignature" is set false by default both in the package or signature level setting which means you don’t need to specifically configure it if you don’t use this feature. (2) Unlike the "enforceCaptureSignature": true setting in package level, which requires the signer to capture signature every capture approval, this setting at the signature level only forces the signer to capture his/her signature when the approval contains the "true" setting.

Running Your Code

In the sample code (download link, below), we have three approvals and only the second signature was marked as "enforce capture". This is what you will see after the package was signed:

Capture

For the second signature, because we enabled the "enforceCaptureSignature" setting, you’ll see that the signature differs from the first one and it overwrites the cached signature data at the same time. Therefore, the new captured signature automatically replicates when the signer signs the third field.

Get the Code

In OneSpan Sign, signers will only be asked to draw their signature once by default. If the transaction requires multiple signatures on the document, OneSpan Sign will automatically replicate the first drawn signature for any subsequent signatures. However, you have the option to require your signer to draw their signature on any given capture signature. This guide will focus on enforcing signature capture at the signature level. If you are looking to enforce this at the transaction level, which would take care of forcing all capture signatures be redrawn, refer to the Signing Ceremony Customization guide.

The Code

"Enforce Signature Capture" feature was introduced in version 11.18. Please make sure your SDK version is later than this. To enable this feature, simply add the .EnableEnforceCaptureSignature() option to your signature builder, as seen below:
Signature enforceCaptureSignature = SignatureBuilder.CaptureFor("[email protected]")
            .WithId(new SignatureId("Signature1"))
            .OnPage(0)
            .AtPosition(100, 200)
            .EnableEnforceCaptureSignature()
	    .Build();
Though applying the feature is simple, there are a couple additional considerations to keep in mind: (1) "enforceCaptureSignature" is set false by default both in the package or signature level setting which means you don’t need to specifically configure it if you don’t use this feature. (2) Unlike the "enforceCaptureSignature": true setting in package level, which requires the signer to capture signature every capture approval, this setting at the signature level only forces the signer to capture his/her signature when the approval contains the "true" setting.

Running Your Code

In the sample code (download link, below), we have three approvals and only the second signature was marked as "enforce capture". This is what you will see after the package was signed:

Capture

For the second signature, because we enabled the "enforceCaptureSignature" setting, you’ll see that the signature differs from the first one and it overwrites the cached signature data at the same time. Therefore, the new captured signature automatically replicates when the signer signs the third field.

Get the Code

In OneSpan Sign, signers will only be asked to draw their signature once by default. If the transaction requires multiple signatures on the document, OneSpan Sign will automatically replicate the first drawn signature for any subsequent signatures. However, you have the option to require your signer to draw their signature on any given capture signature. This guide will focus on enforcing signature capture at the signature level. If you are looking to enforce this at the transaction level, which would take care of forcing all capture signatures be redrawn, refer to the Signing Ceremony Customization guide.

The Code

The sample request below show you how to set enforceCaptureSignature : true at approval level. If you need a comparison to the basic document object creation or if this is the first time creating a package with the REST API, see this guide.

HTTP Request

POST /api/packages

HTTP Headers

Accept: application/json Content-Type: application/json Authorization: Basic api_key

Request Payload

------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="file"; filename="enforce capture signature.pdf"
Content-Type: application/pdf
%PDF-1.5
%µµµµ
1 0 obj
<>>>
endobj.... 
------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="payload"
{
  "documents": [
    {
      "approvals": [
        {
          "fields": [
            {
              "height": 50,
              "id": "Signature1",
              "left": 100,
              "page": 0,
              "subtype": "CAPTURE",
              "top": 100,
              "type": "SIGNATURE",
              "width": 200
            }
          ],
          "id": "Signature1",
          "role": "signer1"
        },
        {
          "fields": [
            {
              "height": 50,
              "id": "Signature2",
              "left": 100,
              "page": 0,
              "subtype": "CAPTURE",
              "top": 200,
              "type": "SIGNATURE",
              "width": 200
            }
          ],
          "id": "Signature2",
          "role": "signer1",
          "enforceCaptureSignature": true
        },
        {
          "fields": [
            {
              "height": 50,
              "id": "Signature3",
              "left": 100,
              "page": 0,
              "subtype": "CAPTURE",
              "top": 300,
              "type": "SIGNATURE",
              "width": 200
            }
          ],
          "id": "Signature3",
          "role": "signer1"
        }
      ],
      "name": "Document1",
      "id": "Document1"
    }
  ],
  "name": "test Enforce Capture at Signature Level",
  "roles": [
    {
      "id": "signer1",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "John",
          "id": "signer1",
          "lastName": "Smith"
        }
      ]
    }
  ],
  "type": "PACKAGE",
  "status": "SENT"
}
------WebKitFormBoundary1bNO60n7FqP5WO4t--
For a complete description of each field, take a look at the Request Payload section below.

Response Payload

{
    "id": "Q6v0Tn_v62G5tfRY43VBE-TEbU4="
}
Though applying the feature is simple, there are a couple additional considerations to keep in mind: (1) "enforceCaptureSignature" is set false by default both in the package or signature level setting which means you don’t need to specifically configure it if you don’t use this feature. (2) Unlike the "enforceCaptureSignature": true setting in package level, which requires the signer to capture signature every capture approval, this setting at the signature level only forces the signer to capture his/her signature when the approval contains the "true" setting.

Running Your Code

In the sample code (download link, below), we have three approvals and only the second signature was marked as "enforce capture". This is what you will see after the package was signed:

Capture

For the second signature, because we enabled the "enforceCaptureSignature" setting, you’ll see that the signature differs from the first one and it overwrites the cached signature data at the same time. Therefore, the new captured signature automatically replicates when the signer signs the third field.

Get the Code

Request Payload

PropertyTypeEditableRequiredDefaultSample Value(s)
statusstringYesNoDRAFTDRAFT / SENT / COMPLETED / ARCHIVED / DECLINED / OPTED_OUT / EXPIRED
typestringYesNoPACKAGEPACKAGE / TEMPLATE / LAYOUT
namestringYesYesn/aEnforce Capture Signature Example
documents
namestringYesNon/asample doc
approvals
fields
subtypestringYesNon/aFULLNAME / INITIALS / CAPTURE / MOBILE_CAPTURE / LABEL / TEXTFIELD / TEXTAREA / CHECKBOX / DATE / RADIO / LIST
typestringYesNon/aSIGNATURE / INPUT
extractbooleanYesNofalsetrue / false
heightintegerYesNo5050 / 100 / 150 ...
leftintegerYesNo050 / 100 / 150 ...
pageintegerYesNo00 / 1 / 2 ...
topintegerYesNo050 / 100 / 150 ...
widthintegerYesNo20050 / 100 / 150 ...
rolestringYesNon/aClient1
enforceCaptureSignaturebooleanYesNofalsetrue / false
roles
idstringYesNon/aClient1
namestringYesNon/aClient1
typestringYesNoSIGNERSIGNER / SENDER
signers
emailstringYesYesn/a[email protected]
firstNamestringYesYesn/aJohn
lastNamestringYesYesn/aSmith
phonestringYesNon/a514-555-8888
idstringYesNon/aClient1
companystringYesNon/aAcme Inc.
titlestringYesNon/aManaging Director