Generate an Electronic Signature of a Document
SignDocumentInit
How it works
This functionality allows you to generate an electronic signature. Currently, only SDD mandates can be signed with this method.
Requirements:
- A Mandate needs to be registered with Register an SDD Mandate
Three steps to follow for this method:
- Call SignDocumentInit: Generate an electronic signature of a document to initialize the signature request and get a token.
- Redirect from your website to WebKit, with the token in GET parameter. See Finalize Document Signature.
- A return page where your user will be redirected after the signature.
XML
<Request>
<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>
</Request>
<Response>
<?xml version="1.0" encoding="utf-8"?>
<SIGNDOCUMENT>
<TOKEN>string</TOKEN>
</SIGNDOCUMENT>
</Response>
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"
}
{
"SIGNDOCUMENT":{
"TOKEN":"string"
}
}
Request Input Description
Item | Description | Mandatory | Format | Example |
---|---|---|---|---|
wallet | Payment account ID | Yes | [0: 256] char | taxi67 |
mobileNumber | Required if no mobile number is assigned to the payment account | 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 | URL called by WebKit to terminate the operation | Yes | [1: 2000] char | https://www.yoursite.com/signature_return.php |
errorUrl | URL called by WebKit in case of an error | Yes | [1: 2000] char | https://www.yoursite.com/signature_error.php |
Response Output Description
Item | Description | Example |
---|---|---|
TOKEN | Payment token to use as GET parameter when redirecting your user to WebKit. | 63458771evCKM8Wn6GPt44HgcRt56gRerAp |
Once you've got the token,
Use WebKit to sign your document:
WEBKITURL?signingtoken=token
https://sandbox-webkit.lemonway.fr/PARTNER_NAME/dev/?signingtoken=63458771evCKM8Wn6GPt44HgcRt56gRerAp
The link is not reusable.
Once opened, the end-user must complete the signing process. Otherwise, a new token will need to be generated.