Smart-ID signing service allows your customers to fill in the blanks in document template and sign the document right after that.

Here are some examples: Demo ContractNDA

To get started go HERE and create your first contract template. Then just copy-paste piece of code (iFrame) to your webpage and that’s it.

Enhanced contract templates

It is also possible to personalize the contract before showing it to the customer and asking him to sign it. It is useful if you want to pre fill the contract with products or services that customer wants to buy. Pre filling fields can be done over API query

This call must have client_id and secret values that you got when you registered your website with Smart ID. In addition there is GET parameter tag_values that is url encoded JSONobject that contains values of the tags defined in the original contract. Field values are remembered up to 24h, after this time passes the API call must be done again to get new code.

Example call is

Similarly it is possible to have editable default values. Instead of tag_values use tag_defaults urlencoded json

Returned value is also JSON object with status either “OK” or “error”. If status is “OK” then there is another field “code” which value is needed in next step where you redirect the customer to sign the contract page. If the status is “error” then it includes “message” which contains details of what exactly went wrong.

Final step is to customize the signing page iframe url parameters and add the code value from the first step. Example sign page url with some blanks prefilled by the API call is

Custom document signing

In some cases the document template still does not give you enough flexibility. In this case it is possible to prepare the file that will be signed yourself. This process contains 2 steps like enhanced contract templates.

Firstly document will be sent via HTTP POST with 3 mandatory URL parameters: client_id, secret and filename. client_id and secret are taken from smartid admin and filename can be whatever you like it to be in the signed doc. Call is sent to query to . Document content will be POST call body in base64 encoded format.

Response to above call is JSON. If successful then the status will be OK and doc_id value is string like {“status”:”OK”,”doc_id”:”rawaQxqrlYrsaGvslt7JFFCcMYztXHHwedFMPbze”} . If there is error then status is error with message like {“status”:”error”,”message”:”Missing filename for the document”} .

Second step is redirecting the customer to the signing page. Page can also be embedded in the iFrame for smoother experience. URL for the signing page needs to have 2 GET parameters: client_id and doc_id. Example of the signing page URL is this