To download the full code sample see our Code Share site.

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 topic 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 Signer Experience Settings.

Enforcing Capture Signature

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();  

Note the following:

  • By default, enforceCaptureSignature" is set to false at both the transaction and signature levels. This means you do not need to do anything if you do not want to use this feature.

  • Unlike the enforceCaptureSignature true setting in transaction level, which requires the signer to capture signature every capture approval, at the signature level enforceCaptureSignature only forces the signer to capture their signature when the approval contains the "true" setting.

Results

In this example, we have three approvals where only the second signature was marked as "enforce capture". This is what you will see after the transaction 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 newly captured signature automatically replicates when the signer signs the third field.

To download the full code sample see our Code Share site.

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 topic 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 Signer Experience Settings.

Enforcing Capture Signature

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();  

Note the following:

  • By default, enforceCaptureSignature" is set to false at both the transaction and signature levels. This means you do not need to do anything if you do not want to use this feature.

  • Unlike the enforceCaptureSignature true setting in transaction level, which requires the signer to capture signature every capture approval, at the signature level enforceCaptureSignature only forces the signer to capture their signature when the approval contains the "true" setting.

Results

In this example, we have three approvals where only the second signature was marked as "enforce capture". This is what you will see after the transaction 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 newly captured signature automatically replicates when the signer signs the third field.

To download the full code sample see our Code Share site.

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 topic 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 Signer Experience Settings.

Enforcing Capture Signature

The sample request below show you how to set enforceCaptureSignature : true at the approval level.

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, see the Request Payload table below.

Response Payload

 {   "id": "Q6v0Tn_v62G5tfRY43VBE-TEbU4="   } 

Note the following:

  • By default, enforceCaptureSignature" is set to false at both the transaction and signature levels. This means you do not need to do anything if you do not want to use this feature.

  • Unlike the enforceCaptureSignature true setting in transaction level, which requires the signer to capture signature every capture approval, at the signature level enforceCaptureSignature only forces the signer to capture their signature when the approval contains the "true" setting.

Results

In this example, we have three approvals where only the second signature was marked as "enforce capture". This is what you will see after the transaction 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 newly captured signature automatically replicates when the signer signs the third field.

Request Payload Table

PropertyTypeEditableRequiredDefaultSample Values
PropertyTypeEditableRequiredDefaultSample Values
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