SignDocumentInit: Generate an Electronic Signature of a Document
Version | Description |
---|---|
1.0 |
How it works
This functionality allows you to generate an electronic signature. For now, only SDD mandates can be signed with this method.
Requirement :
- A Mandate needs to be registered with RegisterSddMandate
Three steps to follow for this method :
- A call to SignDocumentInit: Generate an electronic signature of a document of DirectKit to initialize the signature request and get a token
- A redirection from your website to the WebKit, with the token in GET parameter (see Finalize Document Signature)
- A return page where your user will be redirected after the signature
Request
XML
<SignDocumentInit xmlns="Service_mb">
<wlLogin>string</wlLogin>
<wlPass>string</wlPass>
<language>string</language>
<version>string</version>
<walletIp>string</walletIp>
<walletUa>string</walletUa>
<wallet>string</wallet>
<mobileNumber>string</mobileNumber>
<documentId>string</documentId>
<documentType>string</documentType>
<returnUrl>string</returnUrl>
<errorUrl>string</errorUrl>
</SignDocumentInit>
JSON
{
"wlLogin":"string",
"wlPass":"string",
"language":"string",
"version":"string",
"walletIp":"string",
"walletUa":"string",
"wallet":"string",
"mobileNumber":"string",
"documentId":"string",
"documentType":"string",
"returnUrl":"string",
"errorUrl":"string"
}
Item | Description | Mandatory | Format | Example |
---|---|---|---|---|
wallet | Payment account Id | Yes | [0 : 256] char | taxi67 |
mobileNumber | Required if no mobile number is already assigned to the payment account (using RegisterWallet or UpdateWalletDetails)
| Depends | [6 : 30] char | 33612345678 |
documentId | Mandate Id to sign: output of the call RegisterSddMandate | Yes | int | 46 |
documentType | Use "21" for SDD Mandate | Yes | int | 21 |
returnUrl | You return URL, called by WebKit to terminate the operation | Yes | [1 : 2000] char | |
errorUrl | You return URL, called by WebKit in case of an error | Yes | [1 : 2000] char |
Answer
XML
<?xml version="1.0" encoding="utf-8"?>
<SIGNDOCUMENT>
<TOKEN>string</TOKEN>
</SIGNDOCUMENT>
JSON
{
"SIGNDOCUMENT":{
"TOKEN":"string"
}
}
Item | Description | Example |
---|---|---|
TOKEN | Payment token to use as GET parameter when redirecting your user to the WebKit. The token can be re-used. | 63458771evCKM8Wn6GPt44HgcRt56gRerAp |
Once you've got the token, use the Webkit to sign your document: WEBKITURL?signingtoken=token
https://sandbox-webkit.lemonway.fr/PARTNER_NAME/dev/?signingtoken=63458771evCKM8Wn6GPt44HgcRt56gRerAp
the link is not re-useable. Once you open it, the end-user has to go to the end of the signing process, or else you will have to re-generate another token for him.