E-Contracting
E-Contracting
Create and sign FRA-compliant digital contracts
The e-contracting flow replaces paper contracts with end-to-end digital agreements — legally compliant under the Financial Regulatory Authority (FRA) of Egypt. Vlens handles form collection, document generation, OTP-based customer signing, and service-provider countersignature.
Prerequisites
Before creating a contract, the user must:
- Be registered in Vlens (have a user access token)
- Have a verified digital identity (
isDigitalIdentityVerified: true)
Contract lifecycle
Step 1 — Discover product types
cURL
JavaScript
Python
Use the returned id (e.g. 414) in steps 2 and 4.
Step 2 — Get form fields
The response contains requestsFields — an array of fields the user must fill in. Each field has:
Step 3 — Check eligibility
cURL
JavaScript
isEligible is true only when all checks pass simultaneously.
Step 4 — Create the request
cURL
JavaScript
Python
Save the returned id — this is the request ID required for all signing steps.
Step 5 — Admin approval
After creation, the request enters Pending Approval status. An admin must approve it via:
- The Vlens portal (manual review)
- Auto-approval (if configured for your tenant)
Subscribe to the App.BusinessRequestStatusChange webhook in the portal to receive real-time status updates instead of polling.
Webhook payload example:
Step 6 — Customer signing flow
Once approved, the user activates the contract via a location-checked OTP flow.
6a — Request OTP
Location check: The system compares the submitted location against the user’s last active device location.
6b — Handle location change (if needed)
If the location check fails, call StepReValidateLiveness with new liveness images. Use the same transactionId as the original KYC verification.
6c — Validate OTP
6d — Validate payment and activate
On success the contract moves to Customer Signed (requeststatus: 4).
Request statuses
Retrieve contracts
Service provider countersigning
Once the customer signs, a user with the BusinessRequestContractSigner role must countersign. This can be done:
- Manually in the Vlens portal: navigate to Manage request traffic → select the contract → Actions → Sign Contract
- Automatically using the
serviceprovider_sign_apitool, which polls for Customer Signed contracts at a configured interval
For auto-signing, configure the tool’s .env with VLENS_USERNAME, VLENS_PASSWORD, VLENS_TENANCY, VLENS_APIKEY, VLENS_BASEURL, RequestType, and SignEvery_X_Minutes.

