How widget works

Place the ZapSign widget inside your website in 1 minute

If you want the signer to sign a document without leaving your site, you can add our signature widget to your webpage as in the example below, just replace the "SIGNER-TOKEN" with a real token.

<!DOCTYPE html>
<html>
<head>
	<title>Test Widget ZapSign</title>
</head>
<body>
        <!-- Atention: it is important to include the allow attribute in your iframe so we can access the users camera in case you ask for the signers photo or document photo -->
	<iframe src="https://app.zapsign.co/verificar/SIGNER-TOKEN" width="100%" height="800px" allow="camera"></iframe>

	<script>		
			window.onmessage = function(e){
	        if(e.data === 'zs-doc-loaded'){
	        	alert('Doc loaded in iframe')
	        }
	        if(e.data === 'zs-doc-signed'){
	        	alert('Doc signed by signer')
	        }
	        if(e.data === 'zs-signed-file-ready'){
	        	alert('Signed file (final pdf) ready to download')
	        }
			};
	</script>

</body>
</html>

The "window.onmessage" callback function is optional, it's just a way for you to listen for events that occur inside the iframe. In this case, the events are triggered:

  • zs-doc-loaded: when the PDF finishes loading on the signer's screen.

  • zs-doc-signed: when the signer successfully signs the document.

  • zs-signed-file-ready: when the final PDF is ready to download (this is when the "download signed" button is enabled for example).

Note: Widget integration for documents that make use of the facial recognition authentication method require additional security configurations. If you need that functionality, please reach out to our support team at support@zapsign.com.br for assistance.

Last updated